RFR: Use PLAB for evacuations instead of TLAB
Aleksey Shipilev
shade at redhat.com
Mon May 14 09:27:52 UTC 2018
On 05/14/2018 11:23 AM, Roman Kennke wrote:
> Am 14.05.2018 um 10:52 schrieb Aleksey Shipilev:
>> On 05/11/2018 11:25 PM, Roman Kennke wrote:
>>> Full:
>>> http://cr.openjdk.java.net/~rkennke/plab-gclab/webrev.05/
>>
>> Looks OK. I have a few final questions:
>>
>> *) On this path we can fire assert with -UseTLAB?
>>
>> 256 inline HeapWord* ShenandoahHeap::allocate_from_gclab(Thread* thread, size_t size) {
>> 257 PLAB* gclab = ShenandoahThreadLocalData::gclab(thread);
>> 258 if (gclab == NULL) {
>> 259 assert(!thread->is_Java_thread() && !thread->is_Worker_thread(),
>> 260 "Performance: thread should have GCLAB: %s", thread->name());
>> 261 // No GCLABs in this thread, fallback to shared allocation
>> 262 return NULL;
>> 263 }
>>
>> Otherwise OK.
>
> GCLAB usage is no longer tied to +UseTLAB. I.e. even if we -UseTLAB,
> we'd still be using GCLABs. We can change this if you prefer, or even
> introduce a new flag (e.g. +ShenandoahUseGCLAB) ?
Oh. That was counter-intuitive. But looking how other GCs do this, it seems my intuition about
UseTLAB is wrong. It seems Parallel and G1 still do PLABs even with -UseTLAB, so we are good doing
the same.
-Aleksey
More information about the shenandoah-dev
mailing list