RFR: 8368740: Serial: Swap eden and survivor spaces position in young generation [v2]

Guoxiong Li gli at openjdk.org
Mon Sep 29 06:57:50 UTC 2025


On Fri, 26 Sep 2025 13:27:32 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> Change the relative position of eden and survior spaces in young-gen so that eden can be expanded to fulfill allocation request in heap-near-full scenario. What is on master doesn't allow eden expansion if there is live objs inside from/to after full-gc.
>> 
>> Test: tier1-8
>
> Albert Mingkun Yang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   review

src/hotspot/share/gc/serial/defNewGeneration.cpp line 478:

> 476: 
> 477:   // Keep from/to and expand eden.
> 478:   expand_eden_by(_virtual_space.uncommitted_size());

Just expanding eden space may go against the option `SurvivorRatio`.

src/hotspot/share/gc/serial/defNewGeneration.cpp line 507:

> 505:   const size_t min_survivor_bytes = SpaceAlignment;
> 506:   return reserved_bytes - min_survivor_bytes;
> 507: }

You set `min_survivor_bytes` as `SpaceAlignment`. It seems not obey the eden/survivor ratio rule.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/27513#discussion_r2386884934
PR Review Comment: https://git.openjdk.org/jdk/pull/27513#discussion_r2386826126


More information about the hotspot-gc-dev mailing list