RFR: 8227106: InitiatingHeapOccupancyPercent is G1-specific but defined in shared
Thomas Schatzl
tschatzl at openjdk.java.net
Tue Jan 12 12:37:58 UTC 2021
On Tue, 12 Jan 2021 12:08:31 GMT, Guoxiong Li <github.com+13688759+lgxbslgx at openjdk.org> wrote:
>> Hi,
>>
>> first, apologies for the late reply and actually having this PR get automatically closed due to inactivity.
>>
>> Unfortunately, simply moving the `InitiatingHeapOccupancyPercent` flag to the other file is not sufficient to complete this problem properly. The move to that file implies that the flag will not be available for VM builds without G1 any more, possibly breaking lots of existing deployments - and there are lots of them using that flag.
>> Further, flags in that file should all have a `G1` prefix clearly indicating that this is a G1 specific flag.
>>
>> So a proper path to this "simple" move would probably be:
>>
>> 1) Deprecate `InitiatingHeapOccupancyPercent` so that people can still use it the next few releases. Basically add it at the proper location in `special_jvm_flags` (best grep it).
>> 2) Create a new flag "G1InitiatingHeapOccupancyPercent" and alias the other to this one (and add code handling if both are specified etc).
>> 3) Change the code including the tests to use the new flag.
>> 4) Fix the documentation (which we would need to do as the documentation sources are not public)
>>
>> These two steps require a CSR - I think a single one is sufficient renaming the flag.
>>
>> 5) At some point in the future a few releases out, obsolete and another release ahead, remove the old flag.
>>
>> (I will also add this information to the CR in JIRA)
>>
>> Tbh it's lots of work for not a lot of gain and a certain degree of disruption for end users so it might not be worth it.
>> However I will support you (with improved turnaround time) if you want to continue on that path, as in the end it's work that should be done.
>>
>> Thanks,
>> Thomas
>
> @tschatzl Thank you for your reply.
>
> Maybe the designer want other GC to reuse `InitiatingHeapOccupancyPercent` in the future.
> We should do more investigations about the possible useful situations before we restart this work.
It seems unlikely that this flag will be reused soon: both of the other concurrent collectors, ZGC and Shenandoah, have their own heuristics with their own set of flags that do not exactly match the semantics of `InitiatingHeapOccupancyPercent`.
Feel free to keep this PR closed though for now.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1217
More information about the hotspot-gc-dev
mailing list