RFR: Partial GC: Only evacuating threads push oop to work queue

Roman Kennke rkennke at redhat.com
Thu Mar 16 17:44:54 UTC 2017


Currently, GC threads push evacuated objects to their work queue, no
matter whether this or another thread succeeded to evacuate the object.
This potentially creates too much work, false sharing, requires 2 CASes
(once for the brooks ptr, and once more for updating the ref).

This patch makes the thread check whether it was the one who succeeded
the evac, and only then push the oop to its task queue. This requires a
little refactoring of ShenandoahHeap::evacuate_object() to accept an out
param (better ideas welcome!). I also changed to use ordinary store for
updating refs.

http://cr.openjdk.java.net/~rkennke/partialevacthread/webrev.00/
<http://cr.openjdk.java.net/%7Erkennke/partialevacthread/webrev.00/>

Baseline:

Result "org.openjdk.specjvm2008.Compiler.compiler":
  116,958 ±(99.9%) 39,590 ops/min [Average]
  (min, avg, max) = (87,650, 116,958, 148,328), stdev = 26,186

[282,272s][info][gc,stats] Partial GC                  =    97,73 s (a
=   157883 us) (n =   619) (lvls, us =    66602,   109375,   144531,  
189453,   419521)

Patched:

Result "org.openjdk.specjvm2008.Compiler.compiler":
  124,367 ±(99.9%) 42,775 ops/min [Average]
  (min, avg, max) = (95,156, 124,367, 160,069), stdev = 28,293

[266,515s][info][gc,stats] Partial GC                  =    74,95 s (a
=   119924 us) (n =   625) (lvls, us =    21680,    83984,   113281,  
144531,   275657)


Roman




More information about the shenandoah-dev mailing list