RFR: 8356667: GenShen: Eliminate races with ShenandoahFreeSet::available() [v5]

William Kemper wkemper at openjdk.org
Tue May 13 18:11:25 UTC 2025


On Tue, 13 May 2025 18:08:21 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

>> Two changes:
>> 
>> 1. Compute the difference between capacity and used while holding the heap lock (so that these two values do not change in incompatible ways while the difference is being computed)
>> 2. Return a "harmless" Sentinel value in case available() is consulted while we are in the process of rebuilding the freeset.  The SIZE_MAX value is considered harmless in that it will not cause immediate trigger of a new GC.  In typical usage, the control or regulator thread will check available() again in another millisecond, at which time a more accurate accounting of available will be provided (if the freeset reconstruction has been completed).
>
> Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Another white space problem

Thanks for the changes. Looks good to me!

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

Marked as reviewed by wkemper (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/25165#pullrequestreview-2837697704


More information about the hotspot-gc-dev mailing list