RFR: 8324649: Shenandoah: refactor implementation of free set [v2]
Kelvin Nilsen
kdnilsen at openjdk.org
Fri Jan 26 19:50:34 UTC 2024
On Fri, 26 Jan 2024 18:56:23 GMT, William Kemper <wkemper at openjdk.org> wrote:
>> Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Remove unnecessary change related to debugging
>
> src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp line 550:
>
>> 548: }
>> 549:
>> 550: if (alloc_capacity(r) < PLAB::min_size() * HeapWordSize) {
>
> Why not `TLAB::min_size`?
Good question. You've caused me to dig a little to respond:
size_t PLAB::min_size() {
// Make sure that we return something that is larger than AlignmentReserve
return align_object_size(MAX2(MinTLABSize / HeapWordSize, (size_t)oopDesc::header_size())) + CollectedHeap::lab_alignment_reserve();
}
There is no TLAB::min_size() as far as I can tell. There is MinTLABSize (default 2K unless redefined on command line), but that value appears to get rounded up by alignment in the definition of PLAB::min_size(). I think PLAB:min_size() is what we want here (and elsewhere within this source file).
What do you think?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17561#discussion_r1468082037
More information about the hotspot-gc-dev
mailing list