RFR 8056248: Improve ForkJoin thread throttling

Paul Sandoz paul.sandoz at oracle.com
Fri Aug 29 10:43:16 UTC 2014


Hi,

Please review fixes by Doug to For/Join to improve thread throttling (e.g. for nested parallel streams). This fix resulted in a lot of internal refactoring and clean up.  

In addition a new system property was added "java.util.concurrent.ForkJoinPool.common.maximumSpares" (which i suspect will only very rarely be used), so a CCC will be required:

 http://cs.oswego.edu/pipermail/concurrency-interest/2014-July/012838.html

 * <li>{@code java.util.concurrent.ForkJoinPool.common.maximumSpares}
 * - the maximum number of allowed extra threads to maintain target
 * parallelism (default 256).

  https://bugs.openjdk.java.net/browse/JDK-8056248
  http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8056248-fj-thread-throttling/webrev/


--

Once this review is complete i think we should also backport to 8u40, and likewise for the CompletableFuture updates (which i forgot to mention in a previously related email). 

Both these updates have been soaking in the 166 repo for a month or two. No related test failures were reported for a JPRT run with both patches.

Paul.



More information about the core-libs-dev mailing list