RFR: 8350889: GenShen: Break out of infinite loop of old GC cycles
Kelvin Nilsen
kdnilsen at openjdk.org
Thu Feb 27 18:35:57 UTC 2025
On Thu, 27 Feb 2025 17:30:08 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:
>> PS: the lvalue rate at line 249 isn't used anywhere. Does the compiler complain if you `sample` without assigning the value?
>
> Looked at the code for `ShenandoahAllocationRate`, I guess this may have the effect of making the sampling a bit more asynchronous, but the resulting smoothing over the interval could underestimate the volatility of the rate which is used in an `upper_bound` calculation below. May be that is harmless?
Yes. If we've already decided to trigger, there is no urgency to re-evaluate the allocation rate. We won't be checking for should_start_gc() again until the end of the current gc cycle. At that time, we will update the allocation rate based on how many allocation were realized during the GC cycle. The initial allocation rate estimate will be refined as should_start_gc() is again sampled every ms or so.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23827#discussion_r1974136474
More information about the hotspot-gc-dev
mailing list