RFR: Simplify parallel synchronizer roots iterator
Roman Kennke
rkennke at redhat.com
Wed May 10 14:11:05 UTC 2017
Am 10.05.2017 um 16:07 schrieb Roman Kennke:
> The parallel synchronizer roots iterator is a bit too complicated for no
> good reason (I think, correct me if I'm wrong). It's doing two CASes per
> loop iteration, once over the CHAINED_MARKER/CLAIMED_MARKER in the
> block, and once more over the _cur field in the
> ParallelObjectSynchronizerIterator. I think doing a very simple CAS-loop
> over the _cur field is good enough, and maybe even improves performance
> slightly:
>
> This is what I get with gc-bench's roots.Sync benchmark:
>
> baseline:
> [15,840s][info][gc,stats] S: Synchronizer Roots = 0,16 s (a
> = 17334 us) (n = 9) (lvls, us = 11523, 13867, 14062,
> 16992, 25422)
> [15,841s][info][gc,stats] UR: Synchronizer Roots = 0,11 s (a
> = 12206 us) (n = 9) (lvls, us = 9707, 10352, 11719,
> 11914, 15709)
>
> patched:
> [15,463s][info][gc,stats] S: Synchronizer Roots = 0,15 s (a
> = 16147 us) (n = 9) (lvls, us = 11523, 12500, 15430,
> 15820, 25440)
> [15,463s][info][gc,stats] UR: Synchronizer Roots = 0,10 s (a
> = 11111 us) (n = 9) (lvls, us = 9160, 9414, 9766,
> 11523, 13777)
>
>
> http://cr.openjdk.java.net/~rkennke/simplify-sync-roots/webrev.00/
> <http://cr.openjdk.java.net/%7Erkennke/simplify-sync-roots/webrev.00/>
>
>
> As a nice bonus, this reduces diffs between upstream jdk9 and shenandoah
> jdk9 (removed CLAIMED_MARKER and cas_set_object())
>
> Testing: hotspot_gc_shenandoah, specjvm-derby, gc-bench/roots.Sync
>
> Note: gc-basher fails in hotspot_gc_shenandoah run, but doesn't seem
> related to that change.
I just noticed a leftover from some jdk8u related work in my patch.
Here's the cleaned up patch:
http://cr.openjdk.java.net/~rkennke/simplify-sync-roots/webrev.01/
<http://cr.openjdk.java.net/%7Erkennke/simplify-sync-roots/webrev.01/>
Ok now?
Roman
More information about the shenandoah-dev
mailing list