RFR: 8339387: ZGC: Synchronize medium page allocation [v2]
Axel Boldt-Christmas
aboldtch at openjdk.org
Mon Sep 9 07:11:04 UTC 2024
On Mon, 9 Sep 2024 06:46:25 GMT, Stefan Johansson <sjohanss at openjdk.org> wrote:
>> Please review this change to synchronize medium page allocations in ZGC.
>>
>> **Summary**
>> In ZGC objects of a certain size class are allocated in medium sized pages. For each age there is a single medium page shared by all mutators. When this page gets full all thread that try to do a medium page allocation will try to allocate and install a new medium page, but only one will succeed. This can lead to a lot of unnecessary medium page allocation which in turn can lead to the unnecessary page cache flushing.
>>
>> This change introduces synchronization to only a allow a single thread to allocate the medium page in the common case.
>>
>> **Testing**
>> * Functional testing through mach5 tier1-7 using ZGC
>> * Performance testing through aurora to verify no regression occur
>> * Manual testing to verify performance
>> * Manual testing to verify we avoid page cache flushing
>
> Stefan Johansson has updated the pull request incrementally with two additional commits since the last revision:
>
> - Review - use explicit null checks
> - StefanK review - change lock type
Marked as reviewed by aboldtch (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/20883#pullrequestreview-2288987407
More information about the hotspot-gc-dev
mailing list