RFR: 8318190: GenShen: Be less aggressive with triggers for old-gen has expanded [v3]
Kelvin Nilsen
kdnilsen at openjdk.org
Wed Oct 18 20:55:45 UTC 2023
On Wed, 18 Oct 2023 20:44:30 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:
>> 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.
>
> Thanks for clarifying. I "guess" the main tradeoff is how often do we do the work of evaluating the trigger condition. As currently implemented, we evaluate this condition at the end of each GC cycle, which is relatively rare. If we move it to should_start_gc(), it could be revaluated every ms or so. On the other hand, after we integrate your change, the question of should_start_gc(OLD) will only be asked at the start of a new young gc, which is also relatively rare.
>
> I'll move it now, in anticipation of your improvement, if you concur.
Or should we integrate as is, and let you move the test when as part of your improvement?
-------------
PR Review Comment: https://git.openjdk.org/shenandoah/pull/341#discussion_r1364522634
More information about the shenandoah-dev
mailing list