RFR: 8329223: Parallel: Parallel GC resizes heap even has -Xms = -Xmx [v5]

Albert Mingkun Yang ayang at openjdk.org
Fri Apr 19 14:30:58 UTC 2024


On Fri, 19 Apr 2024 14:13:28 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:

>> Parallel GC resizes old gen even when setting -Xms == -Xmx. 
>> 
>> During GC argument setup, it always set `MinOldSize = GenAlignment` and does not make any adjustment when `-Xms == -Xmx`, while does the adjustment for young gen [here](https://github.com/openjdk/jdk/blob/master/src/hotspot/share/gc/shared/genArguments.cpp#L250)
>
> Zhengyu Gu has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Make sure MinOldSize <= OldSize when it is set on the command line

src/hotspot/share/gc/shared/genArguments.cpp line 312:

> 310: 
> 311:     // Make sure MinOldSize <= OldSize
> 312:     MinOldSize = MIN2(MinOldSize, initial_old_size);

Do you have a test case that requires this? I'd expect `MIN3` above to be enough.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18539#discussion_r1572464867


More information about the hotspot-gc-dev mailing list