Re: One more round… Re: RFA 8056248: Improve ForkJoin thread throttling

Paul Sandoz paul.sandoz at oracle.com
Thu Sep 25 21:55:03 UTC 2014


Hi Sean,

On Sep 25, 2014, at 11:47 AM, Seán Coffey <sean.coffey at oracle.com> wrote:

> Paul,
> 
> After further conversations with Joe Darcy it looks like the safest thing to do here is remove the new system property code completely for the jdk8u backport.
> 
> Consider this request approved if you can pull out the code. Please have someone review the changes also.
> 

Thanks, below is the patch (on top of the change set pushed to 9) removing the system property.

Paul.

diff -r ac4184297775 src/share/classes/java/util/concurrent/ForkJoinPool.java
--- a/src/share/classes/java/util/concurrent/ForkJoinPool.java	Fri Sep 05 10:54:28 2014 +0200
+++ b/src/share/classes/java/util/concurrent/ForkJoinPool.java	Thu Sep 25 14:52:44 2014 -0700
@@ -143,9 +143,6 @@
  * - the class name of a {@link ForkJoinWorkerThreadFactory}
  * <li>{@code java.util.concurrent.ForkJoinPool.common.exceptionHandler}
  * - the class name of a {@link UncaughtExceptionHandler}
- * <li>{@code java.util.concurrent.ForkJoinPool.common.maximumSpares}
- * - the maximum number of allowed extra threads to maintain target
- * parallelism (default 256).
  * </ul>
  * If a {@link SecurityManager} is present and no factory is
  * specified, then the default pool uses a factory supplying
@@ -1316,12 +1313,10 @@
 
     /**
      * The initial value for commonMaxSpares during static
-     * initialization unless overridden using System property
-     * "java.util.concurrent.ForkJoinPool.common.maximumSpares".  The
-     * default value is far in excess of normal requirements, but also
-     * far short of MAX_CAP and typical OS thread limits, so allows
-     * JVMs to catch misuse/abuse before running out of resources
-     * needed to do so.
+     * initialization. The value is far in excess of normal
+     * requirements, but also far short of MAX_CAP and typical
+     * OS thread limits, so allows JVMs to catch misuse/abuse
+     * before running out of resources needed to do so.
      */
     private static final int DEFAULT_COMMON_MAX_SPARES = 256;
 
@@ -3417,8 +3412,6 @@
                 ("java.util.concurrent.ForkJoinPool.common.threadFactory");
             String hp = System.getProperty
                 ("java.util.concurrent.ForkJoinPool.common.exceptionHandler");
-            String mp = System.getProperty
-                ("java.util.concurrent.ForkJoinPool.common.maximumSpares");
             if (pp != null)
                 parallelism = Integer.parseInt(pp);
             if (fp != null)
@@ -3427,8 +3420,6 @@
             if (hp != null)
                 handler = ((UncaughtExceptionHandler)ClassLoader.
                            getSystemClassLoader().loadClass(hp).newInstance());
-            if (mp != null)
-                commonMaxSpares = Integer.parseInt(mp);
         } catch (Exception ignore) {
         }
         if (factory == null) {


More information about the jdk8u-dev mailing list