RFR: 8325670: GenShen: Allow old to expand at end of each GC

Kelvin Nilsen kdnilsen at openjdk.org
Mon Feb 19 17:43:15 UTC 2024


On Mon, 19 Feb 2024 17:22:02 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

>> With this PR, I was attempting to restore the "normal-case behavior" (when ShenandoahOldEvacRatioPercenet != 100) to how it behaved before https://github.com/openjdk/shenandoah/pull/369
>> 
>> Before that change, this line of code did not impose any restriction on the size of old_evacuation_reserve based on old_available:
>> 
>>  size_t maximum_old_evacuation_reserve =  maximum_young_evacuation_reserve * ShenandoahOldEvacRatioPercent / (100 - ShenandoahOldEvacRatioPercent);
>> 
>> For this new code, I invented an "artificial limit" to replace "infiinity" in the case that ShenandoahOldEvacRatioPercent equals 100.
>> 
>> Having studied this issue in the current implementaiton, I am inclined to pursue an even more aggressive change in a distinct [PR](https://github.com/openjdk/shenandoah/pull/395), which allows OLD to grow not only by stealing memory from the Mutator's excesses, but also by borrowing from the Young Collector's reserves.  So I'd prefer not to place more restrictions on the allowed growth of old at this line of code.
>
> If you feel more comfortable, I can put the MIN2 expression into the normal case handling.  But I'll be wanting to take it out in the upcoming complementary PR.

Context: xfer_limit will be zero if there is no "planned" GC idle time.  The allocation runway goes to zero if we have experienced recent degens and/or full GCs, because penalties accumulate which cause us to immediately trigger young GCs.

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

PR Review Comment: https://git.openjdk.org/shenandoah/pull/394#discussion_r1494882108


More information about the shenandoah-dev mailing list