Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8152199

Restructure SuspendibleThreadSet::synchronize

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 9
    • Fix Version/s: tbd
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
      gc
    • CPU:
      generic
    • OS:
      generic

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                kbarrett Kim Barrett
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: