RFR: 8369814: G1: Relax card mark and store ordering

Thomas Schatzl tschatzl at openjdk.org
Tue Oct 14 10:36:39 UTC 2025


On Tue, 14 Oct 2025 09:46:55 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

> This PR removes the card-mark and store ordering constraint. The first commit changes `card_mark_must_follow_store` to `false` and the second commit removes all uses of `card_mark_must_follow_store`, because both the original method and its override are identical, and no GC have such ordering requirement any more.
> 
> Test: tier1-5

I think this PR should also clean up all the deferred card mark code, i.e. everything related to `DeferInitialCardMark` flag.
Since it is `false` by default, `CardTableBarrierSet::_defer_initial_card_mark` is also always `false` now.

There does not seem to be a reason to keep it and surrounding code just for the sake of the flag. This flag is also diagnostic, and can be removed too.

Great find btw!

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

PR Comment: https://git.openjdk.org/jdk/pull/27794#issuecomment-3401156972
PR Comment: https://git.openjdk.org/jdk/pull/27794#issuecomment-3401162268


More information about the hotspot-gc-dev mailing list