RFR: Generation resizing [v3]

William Kemper wkemper at openjdk.org
Wed Dec 14 00:35:35 UTC 2022


On Fri, 9 Dec 2022 00:55:04 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:

>> src/hotspot/share/gc/shenandoah/shenandoahGeneration.cpp line 980:
>> 
>>> 978: }
>>> 979: 
>>> 980: void ShenandoahGeneration::increase_capacity(size_t increment) {
>> 
>> is there some sanity check done on this elsewhere to make sure the increase/decrease make sense? Perhaps I'll see it in the caller(s) when I get to it.
>
> I see now that you do. Would it still be worthwhile asserting here as well that bounds are respected. Might make the code more maintainable in the face of changes.

I will add asserts here.

>> src/hotspot/share/gc/shenandoah/shenandoahMmuTracker.hpp line 90:
>> 
>>> 88:   // allocators by taking the heap lock). The amount of capacity to move
>>> 89:   // from one generation to another is controlled by YoungGenerationSizeIncrement
>>> 90:   // and defaults to 20% of the heap. The minimum and maximum sizes of the
>> 
>> Is the transfer delta always 20%? Wouldn't that cause oscillations about an equilibrium point at steady load? But I should read on to see how this works.
>
> I think the way you use it, it's not 20% of the heap but rather 20% of the free space in the generation that will provide the transfer delta. May be reword for clarity?

Yes, it's 20% of the available capacity.

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

PR: https://git.openjdk.org/shenandoah/pull/177


More information about the shenandoah-dev mailing list