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

Albert Mingkun Yang ayang at openjdk.org
Thu Apr 11 08:55:44 UTC 2024


On Tue, 9 Apr 2024 12:44:51 GMT, Thomas Schatzl <tschatzl 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.

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

Marked as reviewed by ayang (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/18692#pullrequestreview-1993636431


More information about the hotspot-gc-dev mailing list