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

Kim Barrett kim.barrett at oracle.com
Wed Aug 29 03:31:32 UTC 2018


> On Aug 28, 2018, at 3:06 AM, Per Liden <per.liden at oracle.com> wrote:
> 
> 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

Looks good.




More information about the hotspot-gc-dev mailing list