RFR: 8361099: Shenandoah: Improve heap lock contention by using CAS for memory allocation [v17]
Kelvin Nilsen
kdnilsen at openjdk.org
Wed Jan 7 00:36:17 UTC 2026
On Tue, 9 Dec 2025 21:03:21 GMT, Xiaolong Peng <xpeng at openjdk.org> wrote:
>> Xiaolong Peng has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Some comments updates as suggested in PR review
>
> src/hotspot/share/gc/shenandoah/shenandoahAllocator.cpp line 41:
>
>> 39: _alloc_region_count(alloc_region_count), _free_set(free_set), _alloc_partition_name(ShenandoahRegionPartitions::partition_name(ALLOC_PARTITION)) {
>> 40: if (alloc_region_count > 0) {
>> 41: _alloc_regions = PaddedArray<ShenandoahAllocRegion, mtGC>::create_unfreeable(alloc_region_count);
>
> Rethinking about the the PaddedArray used here, we may not really need it.
> Allocator has multiple shared alloc regions for CAS, and only refreshes them when all of them run out of usable memory, so _alloc_regions won't be frequently updated, the PaddedArray here should have a negative performance impact.
Are you running any experiments (on different hardware configurations) to test your assumptions about this?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26171#discussion_r2663185400
More information about the shenandoah-dev
mailing list