jdk
jdk copied to clipboard
8322732: ForkJoinPool may underutilize cores in async mode
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
: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.
@DougLea This change now passes all automated pre-integration checks.
ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.
After integration, the commit message for the final commit will be:
8322732: ForkJoinPool may underutilize cores in async mode
8327854: Test java/util/stream/test/org/openjdk/tests/java/util/stream/WhileOpStatefulTest.java failed with RuntimeException
Reviewed-by: alanb
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.
At the time when this comment was updated there had been 74 new commits pushed to the master branch:
- 2c1b311f81319cee1af574526a91424c2577b78c: 8331854: ubsan: copy.hpp:218:10: runtime error: addition of unsigned offset to 0x7fc2b4024518 overflowed to 0x7fc2b4024510
- 765ad0e40bc522de4b2821ccc60b9139faf7376f: 8331947: Preview creates checkbox for JEP-less preview feature
- 8e903eeb1fa04130fa7f154870ffcb1eae36c070: 8331896: JFR: Improve check for JDK classes
- 3cbdf8d4d4604c92d3760ba4e069216564306bcf: 8333554: Parallel: Remove unused PSParallelCompact::is_in
- 3944e67366601b6f748df1c5f93f184a7cb23ec3: 8312132: Add tracking of multiple address spaces in NMT
- d0052c032cc1927e7e92f04cfedab20e0c4e0293: 8333326: Linux Alpine build fails after 8302744
- 4369856c6dbef15b5d73aa1da07216f372a01294: 8333130: MakeJAR2.sh uses hard-coded JDK version
- 1f09467230971d6458918ec19ffeb259b8c028a3: 8327368: javac crash when computing exhaustiveness checks
- 7dbd03388eef9cddbab6a622338b00ce250be3dc: 8332499: Gtest codestrings.validate_vm fail on linux x64 when hsdis is present
- 9db7c950190853513f4c2afa0efa9a4ff72b60d7: 8332750: Broken link in CatalogFeatures.html
- ... and 64 more: https://git.openjdk.org/jdk/compare/7ab74c5f268dac82bbd36355acf8e4f3d357134c...master
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.
➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.
@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.
Webrevs
- 16: Full - Incremental (aedf9fc4)
- 15: Full - Incremental (3836207b)
- 14: Full - Incremental (becabd04)
- 13: Full - Incremental (47ce3643)
- 12: Full - Incremental (398e5c6a)
- 11: Full - Incremental (b13d8ee1)
- 10: Full - Incremental (1b818b48)
- 09: Full - Incremental (4564b92c)
- 08: Full - Incremental (5e44de45)
- 07: Full - Incremental (e5c4a556)
- 06: Full - Incremental (cf5fe55c)
- 05: Full - Incremental (a262f6c6)
- 04: Full - Incremental (72224779)
- 03: Full - Incremental (28341747)
- 02: Full - Incremental (f1fc4f3e)
- 01: Full - Incremental (8689ac12)
- 00: Full (7e64cdfc)
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 invokeAll doesn't specify an exec or join order; forward exec snf inverse normally uses fewest resources.
Seconding @AlanBateman, I've reviewed and provided feedback on this PR multiple times, and have had numerous runs of parallel streams / gatherers and I think this is good to go. If I was a reviewer my vote would matter, but I'm adding this comment here as an "enthusiastic supporter". :)
/issue JDK-8327854
@DougLea
Adding additional issue to issue list: 8327854: Test java/util/stream/test/org/openjdk/tests/java/util/stream/WhileOpStatefulTest.java failed with RuntimeException.
/integrate
Going to push as commit 789f704d9ab5aaf87193f508859c4c9a528d7779.
Since your change was applied there have been 74 commits pushed to the master branch:
- 2c1b311f81319cee1af574526a91424c2577b78c: 8331854: ubsan: copy.hpp:218:10: runtime error: addition of unsigned offset to 0x7fc2b4024518 overflowed to 0x7fc2b4024510
- 765ad0e40bc522de4b2821ccc60b9139faf7376f: 8331947: Preview creates checkbox for JEP-less preview feature
- 8e903eeb1fa04130fa7f154870ffcb1eae36c070: 8331896: JFR: Improve check for JDK classes
- 3cbdf8d4d4604c92d3760ba4e069216564306bcf: 8333554: Parallel: Remove unused PSParallelCompact::is_in
- 3944e67366601b6f748df1c5f93f184a7cb23ec3: 8312132: Add tracking of multiple address spaces in NMT
- d0052c032cc1927e7e92f04cfedab20e0c4e0293: 8333326: Linux Alpine build fails after 8302744
- 4369856c6dbef15b5d73aa1da07216f372a01294: 8333130: MakeJAR2.sh uses hard-coded JDK version
- 1f09467230971d6458918ec19ffeb259b8c028a3: 8327368: javac crash when computing exhaustiveness checks
- 7dbd03388eef9cddbab6a622338b00ce250be3dc: 8332499: Gtest codestrings.validate_vm fail on linux x64 when hsdis is present
- 9db7c950190853513f4c2afa0efa9a4ff72b60d7: 8332750: Broken link in CatalogFeatures.html
- ... and 64 more: https://git.openjdk.org/jdk/compare/7ab74c5f268dac82bbd36355acf8e4f3d357134c...master
Your commit was automatically rebased without conflicts.
@DougLea Pushed as commit 789f704d9ab5aaf87193f508859c4c9a528d7779.
:bulb: You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.