RFR: 8224659: Parallel GC: Use WorkGang (1: PCRefProcTask)

Leo Korinth leo.korinth at oracle.com
Fri May 24 11:25:47 UTC 2019


Hi,

Here is the first patch in a proposed patch series of eight that
removes gcTaskManager and uses the WorkGang abstraction instead. This
is primary a refactoring to cleanup code for future
enhancements. After this change all GCs will use the WorkGang
abstraction.

# General

Change 1-3 removes pcTask, 4-6 psTask, and then eventually, at nr 7,
task manager is completely removed. Change 8 then both removes and
obsoletes two product flags. The last enhancement has a CSR attached
to it dealing with the flag removal.

More than two thousands lines are removed, 4 JVM flags are removed
or obsoleted. The old thread code is completely removed.

In general I have tried to keep the old structure, and just done
smaller improvements in code. Performance numbers seems to indicate
that we go from roughly no improvements up to more than
40% improvements (!). Regressions seems rare. Performance improvements
are primary in the young collections.

In this first patch the WorkGang is added, and in the seventh patch,
the gcTaskManager is removed. In between, both implementations will be
used for different parts. In the end I will push everything together
so that we will not see two sets of threads at the same time (although
it does work).

# This Patch

This first patch does two things:
1) Adds work gang functionality
    + adds WorkGang named _workers to parallelScavengeHeap
    + sets active workers in psParallelCompact.cpp and
      psScavenge.cpp. The corresponding functionality in gcTaskManager
      is done by gc_task_manager()->set_active_gang()

2) Creates a PCRefProcTask that replaces RefProcTaskProxy and
    StealMarkingTask. The StealMarkingTask is removed in the next
    patch as it is still used by other parts.

Enhancement:
   https://bugs.openjdk.java.net/browse/JDK-8224659

Webrev:
 
http://cr.openjdk.java.net/~lkorinth/workgang/0/_8224659-Parallel-GC-Use-WorkGang-1-PCRefProcTask/
   http://cr.openjdk.java.net/~lkorinth/workgang/0/all/

Testing (on the whole patch series):
   mach5 remote-build-and-test --build-profiles 
linux-x64,linux-x64-debug,macosx-x64,solaris-sparcv9,windows-x64 --test 
open/test/hotspot/jtreg/:hotspot_gc -a -XX:+UseParallelGC
   gc test suite

Thanks,
Leo



More information about the hotspot-gc-dev mailing list