RFR: Borrow from old gen
Kelvin Nilsen
kdnilsen at openjdk.java.net
Tue Feb 8 02:39:42 UTC 2022
On Tue, 8 Feb 2022 00:21:35 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:
>> src/hotspot/share/gc/shenandoah/shenandoahMarkClosures.cpp line 74:
>>
>>> 72: r->reset_age();
>>> 73: } else if (ShenandoahHeap::heap()->is_aging_cycle()) {
>>> 74: r->increment_age();
>>
>> Hmm, we used to increment age for every region during final mark, but now we are doing it during final update refs. This means no regions will be aged for cycles that skip evacuation. Is that what we want? this will have the effect of lowering the promotion rate.
>
> This is a good point. I guess we can increment age in final_mark for any region that is not placed into the collection set. In the case that there is sufficient immediate trash that we do not have to evacuate any regions, then all region ages can be incremented. That would be better. I'll work on this change.
It's a bit more complicated than at first glance. We don't want to increment age before we choose the collection set because that would influence what goes into the collection set. Also, we don't want the age of the region to be added to the object age when deciding whether to promote until after all the objects in this region have not been evacuaetd during an aging cycle. I've made a change that implements the desired behavior. It is basically some special fixup in the case that we short-circuit evacuation. What do you think?
-------------
PR: https://git.openjdk.java.net/shenandoah/pull/110
More information about the shenandoah-dev
mailing list