JDK-8152199 : Restructure SuspendibleThreadSet::synchronize
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 9
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: generic
  • CPU: generic
  • Submitted: 2016-03-18
  • Updated: 2021-12-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
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.

Comments
JDK-8188919 adds an API between safepoint synchronization and the GC. That API will need to be adjusted a bit for this, but at least now there is an API to adjust.
13-10-2017