RFR: 8329223: Parallel: Parallel GC resizes heap even has -Xms = -Xmx [v7]
Albert Mingkun Yang
ayang at openjdk.org
Mon Apr 22 13:21:30 UTC 2024
On Mon, 22 Apr 2024 13:06:39 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:
>> src/hotspot/share/gc/shared/genArguments.cpp line 311:
>>
>>> 309: } else if (initial_old_size < MinOldSize) {
>>> 310: log_warning(gc, ergo)("Inconsistency between initial old size and minimum old size");
>>> 311: MinOldSize = initial_old_size;
>>
>> Should this be `initial_old_size = MinOldSize;`?
>
>> Should this be `initial_old_size = MinOldSize;`?
>
> Any reason why?
>
> The reason I picked current form because the original line was `MinOldSize = MIN2(initial_old_size, MinHeapSize - MinNewSize);`
>
> Thanks
It's mostly to be consistent with `initial_old_size = MaxOldSize;` a few lines above; if the cmdline `OldSize` is inconsistent with other flags, change `OldSize` to fit others.
Technically, when there's inconsistency in cmdline flags, change any of them is equally correct, IMO. In the long run, maybe it's possible to remove the `OldSize` flag, since one can achieve old-size via `InitialHeapSize` and `NewSize`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18539#discussion_r1574746949
More information about the hotspot-gc-dev
mailing list