RFR: 8329528: G1 does not update TAMS correctly when dropping retained regions during Concurrent Start pause

Thomas Schatzl tschatzl at openjdk.org
Thu Apr 11 11:37:50 UTC 2024


On Thu, 11 Apr 2024 08:52:56 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> Hi all,
>> 
>>   please review this change to fix the problem that when g1 ages out regions from the retained region collection set candidate list during a concurrent start gc, the `TAMS`es of these regions are not set correctly.
>> 
>> The change achieves this by changing the order of some calculations in `G1YoungCollector::pre_evacuate_collection_set`: instead of setting `TAMS`es before collection set calculation, do it later, adjusting the predicate determining whether to update the `TAMS`es at concurrent start pause start to exclude regions in the collection set.
>> 
>> Several attempts for different fixes were tried, one of them is still viewable by only considering the changesets before the "alternate implementation" commit. However they quickly grew to fairly large size and complicated the code a lot.
>> 
>> Testing: tier1-3, test case not failing any more
>> 
>> Thanks,
>>   Thomas
>
> The fix is small and easy to backport; can probably further improve the logic around pinning&cset at later PRs.

Thanks @albertnetymk @walulyai for your reviews

-------------

PR Comment: https://git.openjdk.org/jdk/pull/18692#issuecomment-2049494975


More information about the hotspot-gc-dev mailing list