RFR: 8361099: Shenandoah: Improve heap lock contention by using CAS for memory allocation [v20]
Xiaolong Peng
xpeng at openjdk.org
Thu Jan 8 19:42:15 UTC 2026
On Wed, 7 Jan 2026 14:51:49 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:
>> src/hotspot/share/gc/shenandoah/shenandoahAllocator.cpp line 428:
>>
>>> 426: }
>>> 427:
>>> 428: HeapWord* ShenandoahOldCollectorAllocator::allocate(ShenandoahAllocRequest& req, bool& in_new_region) {
>>
>> Confer with William Kemper about this. He is working on a change that may simplify the handling of PLABs, in which case ShenandoahOldCollectorAllocator can behave the same as ShenandoahCollector.
>
> Alternatively, I don't think it would be too terribly difficult to implement try_allocate_aligned() function to support fast (CAS) allocation of aligned PLABs.
It is doable and not very difficult. I'll work on it in a following PR to make ShenandoahOldCollectorAllocator support CAS.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26171#discussion_r2673645194
More information about the shenandoah-dev
mailing list