RFR: Move ShHeap::used increment out of locked allocation path

Aleksey Shipilev shade at redhat.com
Fri Apr 6 16:40:59 UTC 2018


On 04/06/2018 06:25 PM, Roman Kennke wrote:
> Am 06.04.2018 um 17:31 schrieb Aleksey Shipilev:
>> http://cr.openjdk.java.net/~shade/shenandoah/alloc-move-used/webrev.01/
>>
>> Slowly moving more things out of the locked allocation path, to make contention less painful, and to
>> shrink locked region to ultimately eliminate it. This moves the ShHeap::used() handling to lock-free
>> path.
>>
>> Thanks,
>> -Aleksey
>>
> 
> Good!
> 
> I believe there's Atomic::sub() for stuff like Atomic::add(-bytes, &_used).

Alas, not in backports, so we have to use Atomic::add. I have a todo item to make add proper counter
to shenandoahSharedVariables to avoid these things.

-Aleksey



More information about the shenandoah-dev mailing list