RFR: 8357445: G1: Time-Based Heap Uncommit During Idle Periods [v4]

Thomas Schatzl tschatzl at openjdk.org
Thu Jul 17 07:20:55 UTC 2025


On Thu, 17 Jul 2025 06:58:15 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> Monica Beckwith has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8357445: Remove redundant record_activity calls and leftover initialize call
>>   
>>   - Remove record_activity() from retirement methods as hr_clear() is always last
>>   - Remove leftover initialize() call since initialization moved to constructor
>>   - Remove unused G1 includes from vmOperations after moving VM_G1ShrinkHeap
>
> src/hotspot/share/gc/g1/g1_globals.hpp line 391:
> 
>> 389:           "attempt to uncommit memory")                                     \
>> 390:           range(1, max_uintx)                                               \
>> 391:                                                                             \
> 
> Just an initial drive-by comment:
> * not sure I would make `G1UseTimeBasedHeapSizing` experimental (_maybe_ G1MinRegionsToUncommit`, but it seems very similar in use), and disabled by default. I would enable it by default, and make it diagnostic. While the difference between experimental and diagnostic is somewhat arguable, the former is more for developers to enable/disable, and the latter for support team to handle support issues (i.e. diagnose them).
> As for the default value, I expect this to be beneficial always, and the default value indicates a long enough default delay for doing that, i.e. the overhead should be negligible.
> * new manageble flags need a CSR to officially announce the functionality (and the feature needs a release note). Probably also tuning guide changes, but since it is not editable by the public, we at Oracle will handle this.
> I am not yet completely convinced to make these manageable, although I can imagine some reasons. Can you give a good use case you specifically encountered to do so?

Release-note howto: https://openjdk.org/guide/index.html#release-notes. For now I tagged the issue with `release-note=yes`. Note that it can be written later.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26240#discussion_r2212494378


More information about the hotspot-gc-dev mailing list