RFR: Fix and enable suspendible workers by default

Roman Kennke rkennke at redhat.com
Fri Oct 5 12:34:48 UTC 2018


We have encountered an actual bug because of GC workers not suspending
at safepoints:

http://mail.openjdk.java.net/pipermail/shenandoah-dev/2018-October/007776.html

Therefore, I'd like to propose to enable suspendible workers by default.
Unfortuntaly, it has bitrotten a bit:

- conc-evac must only attempt to join the STS when it's actually running
concurrent: when it comes from evac, it would run into deadlock. For
this, I changed op_evac() into op_stw_evac() and op_conc_evac().
- conc-mark should leave the STS before offering termination
- traversal GC did not support STS at all. Added pretty much like
conc-mark and conc-evac.

Some questions arose (maybe to be fixed in followup):
- Since it's a correctness issue, and not convenience, maybe drop the
flag altogether?
- Maybe drop the CANCELLABLE template param in mark-loop? I don't think
this is queried in very hot loop, but instead only once per stride?

http://cr.openjdk.java.net/~rkennke/fix-enable-susp-workers/webrev.00/

Testing: tier3_gc_shenandoah ok
(ShenandoahStrDedupStress times out, but that was pre-existing and
doesn't seem related. It appears that we should cut down the test work
there, or make it time-based to begin with.)

I'll post a jdk8u patch shortly. This requires much more work, because
the stuff is not even existent in jdk8u, and STS has slightly different
APIs too.

Roman



More information about the shenandoah-dev mailing list