[External] : Re: [Discussion] Serial GC: Expand young generation size

Albert Yang albert.m.yang at oracle.com
Tue Jan 28 14:56:33 UTC 2025


Hi Guoxiong,

Thank you for taking care of it.

/Albert

________________________________________
From: Guoxiong Li <lgxbslgx at gmail.com>
Sent: Tuesday, January 28, 2025 15:18
To: Albert Yang
Cc: hotspot-gc-dev at openjdk.org
Subject: [External] : Re: [Discussion] Serial GC: Expand young generation size

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<https://urldefense.com/v3/__https://github.com/openjdk/jdk/pull/23270__;!!ACWV5N9M2RV99hQ!LdykVXWOE3AQ7CzbTj29hiM6_sgmDxvERhAY1gwB79Dlf-toBgx6MFJZmSqqC0snhTj5Uq8ICI0PcU8xe1FN$>
[3] https://bugs.openjdk.org/browse/JDK-8333386
[4] https://github.com/openjdk/jdk/pull/23334<https://urldefense.com/v3/__https://github.com/openjdk/jdk/pull/23334__;!!ACWV5N9M2RV99hQ!LdykVXWOE3AQ7CzbTj29hiM6_sgmDxvERhAY1gwB79Dlf-toBgx6MFJZmSqqC0snhTj5Uq8ICI0PcSWs6fAM$>

On Mon, Jan 13, 2025 at 11:52 PM Guoxiong Li <lgxbslgx at gmail.com<mailto: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<https://urldefense.com/v3/__https://github.com/openjdk/jdk/commit/6b961acb87c29027f2158c6b7a764f1276a0bf52*diff-d53bf148d2758636cb8c6a54595515610a4c52d953e23e7bfdeef1106c14f626R286-R290__;Iw!!ACWV5N9M2RV99hQ!LdykVXWOE3AQ7CzbTj29hiM6_sgmDxvERhAY1gwB79Dlf-toBgx6MFJZmSqqC0snhTj5Uq8ICI0PcTSXqVVs$>



More information about the hotspot-gc-dev mailing list