RFR: 8294845: Make globals accessed by G1 young gen revising atomic
Thomas Schatzl
tschatzl at openjdk.org
Tue Oct 25 08:09:03 UTC 2022
Hi all,
can I have reviews for this cleanup that makes a few globals accessed by `G1Policy::update_young_length_bounds` "atomic" as per style guide? Basically there are a few variables that are changed by young gen size revising that are read concurrently, and to indicate that, this change decorates them with the `Atomic` accessor functions.
This is no attempt to fix any visibility races that (already, pre-existing) occur when these values are written and read; I think all of these are benign and can at most lead to having garbage collections that are "too late" or "too early" due to that. However all the young gen length revising, particularly in presence of the gclocker, is and has always been a best effort approach as far as I could ever tell.
Testing: gha
Thanks,
Thomas
-------------
Commit messages:
- Add include, add some comment
- Make some globals atomic
Changes: https://git.openjdk.org/jdk/pull/10845/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10845&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8294845
Stats: 38 lines in 2 files changed: 15 ins; 6 del; 17 mod
Patch: https://git.openjdk.org/jdk/pull/10845.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/10845/head:pull/10845
PR: https://git.openjdk.org/jdk/pull/10845
More information about the hotspot-gc-dev
mailing list