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

Ivan Walulya iwalulya at openjdk.org
Tue Nov 1 13:10:32 UTC 2022


On Tue, 25 Oct 2022 07:57:15 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

> 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

Marked as reviewed by iwalulya (Reviewer).

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

PR: https://git.openjdk.org/jdk/pull/10845


More information about the hotspot-gc-dev mailing list