RFR: 8294845: Make globals accessed by G1 young gen revising atomic [v2]

Thomas Schatzl tschatzl at openjdk.org
Wed Nov 2 09:49:50 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

Thomas Schatzl has updated the pull request incrementally with one additional commit since the last revision:

  remove superfluous casts

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/10845/files
  - new: https://git.openjdk.org/jdk/pull/10845/files/77af16da..c2825bd3

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=10845&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=10845&range=00-01

  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 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