RFR: 8047998: Abort the vm if MaxNewSize is not the same as NewSize when MaxHeapSize is the same as InitialHeapSize [v2]

Thomas Schatzl tschatzl at openjdk.org
Fri Jun 2 07:43:10 UTC 2023


On Thu, 1 Jun 2023 09:33:10 GMT, Guoxiong Li <gli at openjdk.org> wrote:

>> Hi all,
>> 
>> When `MaxHeapSize` is equal to `InitialHeapSize` and `NewSize` is set in command line,
>> currently, the `max_young_size/MaxNewSize` will be set to the value of `NewSize`.
>> 
>> Considering the document of the `NewSize` (shown below), someone may set the `NewSize` 
>> to a very small value and expect the JVM to adjust the value dynamically.
>> Then when the `MaxHeapSize` is equal to `InitialHeapSize` (set by user or ergonomics),
>> the `MaxNewSize` is set to the value of `NewSize`, which is small unexpectedly.
>> 
>> 
>>   product(size_t, NewSize, ScaleForWordSize(1*M),                           \
>>           "Initial new generation size (in bytes)")                         \
>>           constraint(NewSizeConstraintFunc,AfterErgo)                       \
>> 
>> 
>> This patch fixes the issue by setting the `MaxNewSize` to `NewSize` only when the `NewSize` 
>> is larger than the original `max_young_size/MaxNewSize`.
>> 
>> The title of JDK-8047998 may need to adjusted.
>> 
>> Thanks for the review.
>> 
>> Best Regards,
>> -- Guoxiong
>
> Guoxiong Li has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
> 
>  - Abort the vm instead of setting it implicitly.
>  - Merge branch 'master' into JDK-8047998
>  - JDK-8047998

Marked as reviewed by tschatzl (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/13876#pullrequestreview-1456821605


More information about the hotspot-gc-dev mailing list