RFR: 8357449: ZGC: Multiple medium page sizes [v6]
Axel Boldt-Christmas
aboldtch at openjdk.org
Wed May 28 05:44:56 UTC 2025
On Tue, 27 May 2025 15:51:33 GMT, Joel Sikström <jsikstro at openjdk.org> wrote:
>> Axel Boldt-Christmas has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Update test/hotspot/jtreg/gc/z/TestZMediumPageSizes.java
>>
>> Co-authored-by: Andrey Turbanov <turbanoff at gmail.com>
>
> src/hotspot/share/gc/z/zPageAllocator.cpp line 459:
>
>> 457:
>> 458: return _size;
>> 459: }
>
> I see that we don't use `_size` anywhere except for here, even so, I think we should rename `_size` to be something more descriptive, in case that changes in the future. Maybe somehthing like `_requested_size`?
>
> I don't have strong opinions on what the new name should be, just something to highlight that `_size` isn't always the size of the allocated page.
Done.
I also experimented with adding two separate accessors / fields. One `requested_size` and one `claimed_size`. Where you set the claimed size after capacity has been claimed. And then change all `size()` calls to the appropriate information they are looking for. Some are the claimed_size and some are the requested_size.
However was not really happy with having to sprinkle `set_claimed_size` in a few places.
I think we can iterate on the ZPageAllocation in the future. I think having some type of `optional<variant<ZSinglePartitionAllocation, ZMultiPartitionAllocation, ZFastMediumAllocation>> _allocation` may be a more appropriate abstraction. And treat `ZMultiPartitionAllocation` more akin to a `ZMultiPartitionAllocationRequest`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25381#discussion_r2110969832
More information about the hotspot-gc-dev
mailing list