RFR: 8318190: GenShen: Be less aggressive with triggers for old-gen has expanded [v3]

William Kemper wkemper at openjdk.org
Tue Oct 17 23:57:14 UTC 2023


On Tue, 17 Oct 2023 23:32:43 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

>> src/hotspot/share/gc/shenandoah/heuristics/shenandoahOldHeuristics.cpp line 519:
>> 
>>> 517:   }
>>> 518: 
>>> 519:   if (_growth_trigger) {
>> 
>> Could the trigger just evaluate the condition directly? It's not clear why we double check `_growth_trigger` condition instead of just checking once when trigger is evaluated?
>
> Just to be sure: are you suggesting that before we raise the _growth_trigger, we should confirm that we are not doing mixed evacuations?  And then we don't have to recheck whether the trigger condition is still valid when we get to here?

I was suggesting we move [the logic that raises these triggers](https://github.com/openjdk/shenandoah/blob/master/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp#L3100-L3123) into the heuristic itself. This would reduce changes in shenandoahHeap.cpp and better encapsulate the logic for the heuristic.

If we want to align evaluation of these triggers with rebuilding the freeset (so that they aren't being evaluated at the same frequency as the young generation), we could add a `heap_has_changed` flag (or something). I'm also working on a change to only evaluate old generation triggers when the young generation trigger has fired.

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

PR Review Comment: https://git.openjdk.org/shenandoah/pull/341#discussion_r1362938186


More information about the shenandoah-dev mailing list