RFR: 8356716: ZGC: Cleanup Uncommit Logic [v3]
Axel Boldt-Christmas
aboldtch at openjdk.org
Tue May 27 06:10:58 UTC 2025
On Mon, 26 May 2025 13:45:03 GMT, Joel Sikström <jsikstro at openjdk.org> wrote:
>> Axel Boldt-Christmas 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 18 additional commits since the last revision:
>>
>> - Merge remote-tracking branch 'upstream_jdk/master' into JDK-8356716
>> - Wrong too
>> - Less archaic spelling of complete
>> - Cleanup and simplify
>> - Move all uncommit logic to zUncommitter
>> - Log time spent uncommitting
>> - Split reset_uncommit_cycle and add headroom
>> - Rename _min_last_uncommit_cycle to _min_size_watermark
>> - Use milliseconds instead of seconds
>> - Improve events and statistics
>> - ... and 8 more: https://git.openjdk.org/jdk/compare/6ee4af7a...43c0795a
>
> src/hotspot/share/gc/z/zUncommitter.cpp line 116:
>
>> 114: // Done
>> 115: break;
>> 116: }
>
> Is it possible to convert this to something like the following to make it clearer that this is the "end condition" of the cycle? From what I can see, 2/3 paths that return 0 in `uncommit()` calls `cancel_uncommit_cycle()`.
> Suggestion:
>
> if (uncommit_cycle_is_canceled() || uncommit_cycle_is_finished()) {
> // No more work, cycle is done.
> break;
> }
It is used as a proxy to not have to retake the lock. Will add a comment.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25198#discussion_r2108258237
More information about the hotspot-gc-dev
mailing list