RFR: 8354929: ZGC: Update collection stats while holding page allocator lock [v3]
Stefan Karlsson
stefank at openjdk.org
Tue Apr 22 07:23:55 UTC 2025
On Tue, 22 Apr 2025 07:07:04 GMT, Stefan Johansson <sjohanss at openjdk.org> wrote:
>> Please review this change to restructure some code in the mark start pause to do updates while holding the lock.
>>
>> **Summary**
>> We currently update the collection high and low used values during the mark start pause without taking the page allocator lock. This is fine since it is read atomically, but consistency verification in this code requires the lock to be held. We later in the pause take the lock to get the current statistics, this change moves the update code to also happen while holding the lock.
>>
>> I've renamed `reset_statistics()` to `update_collection_stats()` to better match what it actually does and made it private.
>>
>> **Testing**
>> Mach5 tier1-5
>
> Stefan Johansson has updated the pull request incrementally with one additional commit since the last revision:
>
> Improved assert message
>
> Co-authored-by: Axel Boldt-Christmas <xmas1915 at gmail.com>
Marked as reviewed by stefank (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/24719#pullrequestreview-2783062025
More information about the hotspot-gc-dev
mailing list