jdk icon indicating copy to clipboard operation
jdk copied to clipboard

8322732: ForkJoinPool may underutilize cores in async mode

Open DougLea opened this issue 3 months ago • 5 comments

This set of changes address causes of poor utilization with small numbers of cores due to overly aggressive contention avoidance. A number of further adjustments were needed to still avoid most contention effects in deployments with large numbers of cores


Progress

  • [ ] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • [x] Change must not contain extraneous whitespace
  • [x] Commit message must refer to an issue

Issue

  • JDK-8322732: ForkJoinPool may underutilize cores in async mode (Bug - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19131/head:pull/19131
$ git checkout pull/19131

Update a local copy of the PR:
$ git checkout pull/19131
$ git pull https://git.openjdk.org/jdk.git pull/19131/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 19131

View PR using the GUI difftool:
$ git pr show -t 19131

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19131.diff

Webrev

Link to Webrev Comment

DougLea avatar May 07 '24 22:05 DougLea

:wave: Welcome back dl! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

bridgekeeper[bot] avatar May 07 '24 22:05 bridgekeeper[bot]

❗ This change is not yet ready to be integrated. See the Progress checklist in the description for automated requirements.

openjdk[bot] avatar May 07 '24 22:05 openjdk[bot]

@DougLea The following label will be automatically applied to this pull request:

  • core-libs

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

openjdk[bot] avatar May 07 '24 22:05 openjdk[bot]

Maybe I don't quite understand, or I don't have proof, But wouldn't it be better if invokeAll in FIFO mode (asyncMode) traverses the Future list as a FIFO (currently it traverses in LIFO order)

sunmisc avatar May 16 '24 10:05 sunmisc

@sunmisc invokeAll doesn't specify an exec or join order; forward exec snf inverse normally uses fewest resources.

DougLea avatar May 22 '24 23:05 DougLea