As part of safepointing, the VM thread calls SuspendibleThreadSet::synchronize. This requests all the threads in the set to either exit the set or yield, and blocks any threads attempting to enter the set. It then waits until all threads in the set have responded (by leaving or yielding). JDK-8152196 addresses one source of delay in this process, reducing latency in the wakeup of the requesting VM thread. However, a possibly much larger source of delay is the time required for all threads in the set to notice the suspend request, tidy up what they are doing, and either leave the set or yield.
We could split the synchronize request into two parts, the request generator and the wait, and allow the VM thread to perform other work in between those. This would allow the VM thread to make progress toward the safepoint while allowing the suspendible threads to reach quiescence in parallel.
We could split the synchronize request into two parts, the request generator and the wait, and allow the VM thread to perform other work in between those. This would allow the VM thread to make progress toward the safepoint while allowing the suspendible threads to reach quiescence in parallel.
- relates to
-
JDK-8278475 G1 dirty card refinement by Java threads may get unnecessarily paused
-
- Resolved
-
-
JDK-8152196 SuspendibleThreadSet::yield scales poorly
-
- Resolved
-
-
JDK-8188919 Generalize GC thread suspend/resume at safepoints
-
- Resolved
-
-
JDK-8189276 Make SuspendibleThreadSet and related code available to other GCs
-
- Resolved
-
-
JDK-8154221 Long pauses of application threads caused by VMThread and concurrent mark of large array
-
- Closed
-