RFR: 8336086: G1: Use one G1CardSet instance for all young regions [v2]
Thomas Schatzl
tschatzl at openjdk.org
Wed Aug 14 08:04:59 UTC 2024
On Mon, 5 Aug 2024 14:42:45 GMT, Ivan Walulya <iwalulya at openjdk.org> wrote:
>> Hi all,
>>
>> Please review this change to assign a single G1CardSet to all young regions. As young regions are collected at the same, and we do not have young-to-young remembered sets, we can maintain a single G1CardSet for all young regions.
>>
>> This reduces the memory overhead of the G1CardSets and the time taken to merge per region G1CardSets during GC pause.
>>
>> Testing: Tier 1-5
>
> Ivan Walulya has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains seven commits:
>
> - Albert Review
> - Merge remote-tracking branch 'upstream/master' into YoungOnlyCardSet
> - Merge remote-tracking branch 'upstream/master' into YoungOnlyCardSet
> - cleanup
> - merge
> - Merge remote-tracking branch 'upstream/master' into YoungOnlyCardSet
> - init
Apologies for the late review.
src/hotspot/share/gc/g1/g1CollectedHeap.cpp line 3053:
> 3051:
> 3052: void G1CollectedHeap::prepare_group_cardsets_for_scan () {
> 3053: _young_regions_cardset.reset_table_scanner(4);
Please make that "4" a constant like "GroupBucketClaimSize" and put it next to `BucketClaimSize` with an appropriate comment ("claim size for groups should be smaller to facilitate work distribution across less but larger card sets" or so).
src/hotspot/share/gc/g1/g1CollectedHeap.hpp line 783:
> 781:
> 782: // Group cardsets
> 783: G1CardSetMemoryManager _card_set_mm;
Is it possible to rename this to `_young_regions_card_set_mm` to make it more clear this is the card set memory manager for young regions?
-------------
Changes requested by tschatzl (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/20134#pullrequestreview-2237426651
PR Review Comment: https://git.openjdk.org/jdk/pull/20134#discussion_r1716472629
PR Review Comment: https://git.openjdk.org/jdk/pull/20134#discussion_r1716478692
More information about the hotspot-gc-dev
mailing list