[Discussion] Serial GC: Expand young generation size

Guoxiong Li lgxbslgx at gmail.com
Tue Jan 28 14:18:08 UTC 2025


Hi Albert,

When I reviewed the PR [2] of JDK-8346920 [1], I suspected that it would
make the bug JDK-8333386 [3] occur again.
Then I ran the test case `TestAbortOnVMOperationTimeout.java` in the
current mainline code and it failed again in the client VM again.
So, I submitted the PR [4] to fix it [3].

Best Regards,
-- Guoxiong

[1] https://bugs.openjdk.org/browse/JDK-8346920
[2] https://github.com/openjdk/jdk/pull/23270
[3] https://bugs.openjdk.org/browse/JDK-8333386
[4] https://github.com/openjdk/jdk/pull/23334

On Mon, Jan 13, 2025 at 11:52 PM Guoxiong Li <lgxbslgx at gmail.com> wrote:

> 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/20250128/f62a442a/attachment-0001.htm>


More information about the hotspot-gc-dev mailing list