[Discussion] Serial GC: Expand young generation size

Guoxiong Li lgxbslgx at gmail.com
Mon Jan 13 15:52:08 UTC 2025


Hi Albert,

Sorry for any delay. I bisect the related patches in several days.

> Re https://bugs.openjdk.org/browse/JDK-8333386, I think your suggestion,
"add the option `-XX:NewSize=65m`", is the way to go.

When I run the test case `TestAbortOnVMOperationTimeout` [1] in current
main-line code,
the test case passed in the client VM. I bisected all the related patches
these months
and found the change (the test case passed) began at JDK-8333786 [2].
Then I tried partial code of JDK-8333786 [2] in its previous patch (the
code is in [3]),
and finally I found the method
`SerialHeap::should_try_older_generation_allocation` [4]
in JDK-8333786 [2] makes the test case pass in the client VM.
It is because such a change can make the
`DefNewGeneration::compute_new_size`
effective, and then the young-gen size can be expanded after the GC.
So I think the JDK-8333386 [1] is not a bug now and the ticket can be
closed.
What do you think about it?

> As for adding young-gen expansion support to Serial, it probably should
have its own enhancement ticket.
>
> I am currently working on placing from/to spaces before eden inside
young-gen as part of Parallel heap-auto-sizing. I believe Serial can use
the same layout (from/to/eden, instead of eden/from/to) to facilitate
eden/young-gen expansion. My 2c.

Yes, the expansion should have its ticket and need more investigation and
discussion. And this email line is the beginning of the discussion.

Best Regards,
-- Guoxiong

[1] https://bugs.openjdk.org/browse/JDK-8333386
[2] https://bugs.openjdk.org/browse/JDK-8333786
<https://bugs.openjdk.org/browse/JDK-8333386>
[3] https://bugs.openjdk.org/browse/JDK-
<https://bugs.openjdk.org/browse/JDK-8333386>8335007
<https://bugs.openjdk.org/browse/JDK-8333386>
[4]
https://github.com/openjdk/jdk/commit/6b961acb87c29027f2158c6b7a764f1276a0bf52#diff-d53bf148d2758636cb8c6a54595515610a4c52d953e23e7bfdeef1106c14f626R286-R290
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20250113/dda4f2d5/attachment.htm>


More information about the hotspot-gc-dev mailing list