-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8356000: C1/C2-only modes use 2 compiler threads on low CPU count machines #24972
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8356000: C1/C2-only modes use 2 compiler threads on low CPU count machines #24972
Conversation
|
👋 Welcome back shade! A progress list of the required criteria for merging this PR into |
|
@shipilev 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: 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 5 new commits pushed to the
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 |
Webrevs
|
dafedafe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @shipilev for fixing this (it might be a minor bug but still... inconsistent 🙂)
|
Update: Added the test that verifies heuristics performs as expected. This test also explores what happens with explicit I also had to add |
|
Any further comments / testing? Thanks. |
galderz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix and expanding the test case.
vnkozlov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine. I submitted testing.
vnkozlov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing mostly passed. Only macOS-aarch64 left (linux-aarch64 passed). I think it is fine to integrate without waiting.
|
All my testing passed. |
dafedafe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very thorough test! Thanks a lot @shipilev!
|
During the final pre-integration checks, I noticed that this PR still has buffer adjustments for I see JDK-8354727 was filed to figure out what happens when we are scarce on code cache, so I would feel better to put it on @mhaessig to mix c43b18a into his work :) |
Will do. Thanks for the heads up! |
vnkozlov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-approved
|
Excellent, thanks for reviews! Here goes. /integrate |
|
Going to push as commit 4e314cb.
Your commit was automatically rebased without conflicts. |
There is an unfortunate limitation with default tiered policy that we would have at least 2 threads on 1 CPU machine: 1 thread for C1, and 1 thread for C2.
But if we select C1-only or C2-only modes, we also get 2 compiler threads, for which we have no good reason. These threads would just step on each other toes. The fix changes the behavior for 1..3 CPU hosts in C1/C2-only configurations, by using 1 thread instead of 2 threads. The change for 1 CPU config is what we really need. The change in 2..3 CPU configs is an additional effect, but I think it is still good not to use 100%/66% of the CPUs in those configurations as well.
It is a minor bug in
CompilationPolicy::initialize, but it gets in the way studying Leyden in tight CPU scenarios.Additional testing:
allProgress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/24972/head:pull/24972$ git checkout pull/24972Update a local copy of the PR:
$ git checkout pull/24972$ git pull https://git.openjdk.org/jdk.git pull/24972/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 24972View PR using the GUI difftool:
$ git pr show -t 24972Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/24972.diff
Using Webrev
Link to Webrev Comment