RFR: 8354929: Update collection stats while holding page allocator lock [v2]
Thomas Schatzl
tschatzl at openjdk.org
Fri Apr 18 08:32:41 UTC 2025
On Thu, 17 Apr 2025 18:15:21 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 two additional commits since the last revision:
>
> - Additional blank line
>
> Co-authored-by: Stefan Karlsson <stefan.karlsson at oracle.com>
> - Additional blank line
>
> Co-authored-by: Stefan Karlsson <stefan.karlsson at oracle.com>
Marked as reviewed by tschatzl (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/24719#pullrequestreview-2778082113
More information about the hotspot-gc-dev
mailing list