RFR: 8210045: Allow using a subset of worker threads even when UseDynamicNumberOfGCThreads is false

Per Liden per.liden at oracle.com
Tue Aug 28 07:06:08 UTC 2018


When UseDynamicNumberOfGCThreads is not set, AbstractWorkGang requires 
all worker threads to be used when starting a task. For example, calling 
update_active_workers(5) on a WorkGang with 10 worker threads results in 
an failed assert. ZGC does not dynamically re-calculate the number of 
workers to use each GC cycle (except for the boost-mode), in the way 
that UseDynamicNumberOfGCThreads suggests. However, it shares a single 
WorkGang for both STW and concurrent phases, where the concurrent phases 
typically want to use fewer workers than the STW phases. Today, ZGC is 
forced to set UseDynamicNumberOfGCThreads to true to avoid the assert in 
update_active_workers(). I propose that we remove this assert, making 
AbstractWorkGang slightly more flexible on this point.

Bug: https://bugs.openjdk.java.net/browse/JDK-8210045
Webrev: http://cr.openjdk.java.net/~pliden/8210045/webrev.0

/Per



More information about the hotspot-gc-dev mailing list