RFR: 8305896: Alternative full GC forwarding [v15]
Roman Kennke
rkennke at openjdk.org
Tue May 2 12:50:22 UTC 2023
On Tue, 2 May 2023 11:47:15 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> Roman Kennke has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Some more changes by @shipilev
>
> src/hotspot/share/gc/shared/genCollectedHeap.cpp line 136:
>
>> 134: GCInitLogger::print();
>> 135:
>> 136: GCForwarding::initialize(_reserved, SpaceAlignment);
>
> The second argument is not "shift" anymore, right? So this should be the actual reserved space size?
I think SpaceAlignment is correct. We want to pass a region-size there, and the (default) region size for Serial should be the space alignment, because that is what eden, survivors and old-space will be aligned at. Unfortunately, Serial GC doesn't generally slide from top to bottom: it starts to slide old into old, then young into old until old is full, then slide the rest into young. Even worse, the survivor spaces are swapped with every GC cycle, so we really don't know that sliding goes top -> bottom. Using 'virtual' regions that align at SpaceAlignment solves the problem, though.
(One exception is when the whole heap fits into our 2^28 words range, in which case we can treat the whole heap as single region)
That said, I see a bug in the line: GCForwarding::initialize() takes region size *in words* but SpaceAlignment is *in bytes*. I'm fixing that to passing space-alignment in words instead.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13582#discussion_r1182500382
More information about the shenandoah-dev
mailing list