RFR: Use PLAB for evacuations instead of TLAB
Roman Kennke
rkennke at redhat.com
Wed May 9 21:19:14 UTC 2018
Am 09.05.2018 um 22:45 schrieb Zhengyu Gu:
> Hi Roman,
>
> On 05/09/2018 02:11 PM, Roman Kennke wrote:
>> Need to move around some UseTLAB guards. The GCLABs are enabled
>> regardless of UseTLAB or not. Do we want to guard this with a separate
>> flag?
>>
>> Diff:
>> http://cr.openjdk.java.net/~rkennke/plab-gclab/webrev.01.diff/
>> Full:
>> http://cr.openjdk.java.net/~rkennke/plab-gclab/webrev.01/
>
> ShenandoahBarrierSet.cpp L384:
> thread is passed in as JavaThread*, so this test is unnecessary, and
> "else" path can be eliminated.
Oops. Fixed.
> ShenandoahHeap.cpp L1499
> Need scope block for
> 1499 ShenandoahGCPhase phase(ShenandoahPhaseTimings::make_parsable);
> 1500 make_tlabs_parsable(true);
>
> or should just keep UseTLAB test here to avoid misleading timing info,
> in case of phase time > 0.
We also need to always retire the GCLABs, regardless of UseTLABs, the
test is moved into the retire_all_tlabs() code.
I also fixed some other issues that came up in more testing:
A typo:
- _collector_gclab_stats(new PLABStats("Shenandoah colletor GCLAB
stats", YoungPLABSize, PLABWeight)),
+ _collector_gclab_stats(new PLABStats("Shenandoah collector GCLAB
stats", YoungPLABSize, PLABWeight)),
Added a call to
+ accumulate_statistics_all_gclabs();
in op_init_updaterefs()
This latter one is very important. I only used to do this in
op_final_evac() but this is almost never called. We need it to get
appropriately sized GCLABs.
I ran some quick performance tests and nothing suspicious came up. Evac
times are where they used to be. Will run comprehensive before/after
comparison over night.
Eyeballing -Xlog:gc+plab=debug looks reasonable to me:
[164,441s][debug][gc,plab] GC(85) Shenandoah mutator GCLAB stats PLAB
allocation: allocated: 1516008B, wasted: 72880B, unused: 486880B, used:
956248B, undo waste: 0B,
[164,441s][debug][gc,plab] GC(85) Shenandoah mutator GCLAB stats sizing:
calculated: 956248B, actual: 1271144B
[164,441s][debug][gc,plab] GC(85) Shenandoah colletor GCLAB stats PLAB
allocation: allocated: 182452224B, wasted: 357312B, unused: 9645144B,
used: 172449768B, undo waste: 0B,
[164,441s][debug][gc,plab] GC(85) Shenandoah colletor GCLAB stats
sizing: calculated: 172449768B, actual: 199585872B
This sizing looks about right.
Diff:
http://cr.openjdk.java.net/~rkennke/plab-gclab/webrev.02.diff/
Full:
http://cr.openjdk.java.net/~rkennke/plab-gclab/webrev.02/
More information about the shenandoah-dev
mailing list