RFR: 8314573: G1: Heap resizing at Remark does not take existing eden regions into account
Thomas Schatzl
tschatzl at openjdk.org
Thu Aug 24 11:30:25 UTC 2023
On Thu, 24 Aug 2023 07:50:55 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> However this is no different to the current situation after full gc
>I don't think they are the same -- in full-gc case eden is indeed empty, while in remark-pause the patch treats eden as empty even when it's not.
>
>The version on master treats eden as full and do the heap resizing (expand/shrink).
The marking cycle should be a replacement a full collection (or that is the idea), including heap resizing.
Remark pause is just some place in this replacement full collection cycle where the amount of free regions is maximal (given we free empty regions there).
Eden allocations are in some way as if they did not exist from a full collection heap resizing POV. This change implements this.
> Can we permit only shrink in remark-pause, since eden liveness is unknown at that moment?
We could do an approximation, but for the sake of simplicity this change does not.
> (Remark-pause occurs not due to alloc-failure, so it is kind of logical not to expand the heap.)
I do not follow this. When to resize the heap is arbitrary, but it seems to be the "best" place to simulate a full collection cycle.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15400#issuecomment-1691500700
More information about the hotspot-gc-dev
mailing list