-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8354727: CompilationPolicy creates too many compiler threads when code cache space is scarce #25872
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
Conversation
Co-authored-by: Aleksey Shipilev <shade@openjdk.org>
|
👋 Welcome back mhaessig! A progress list of the required criteria for merging this PR into |
|
@mhaessig 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 4 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 |
|
/contributor add @shipilev |
|
@mhaessig |
|
The parent pull request that this pull request depends on has now been integrated and the target branch of this pull request has been updated. This means that changes from the dependent pull request can start to show up as belonging to this pull request, which may be confusing for reviewers. To remedy this situation, simply merge the latest changes from the new target branch into this pull request by running commands similar to these in the local repository for your personal fork: git checkout JDK-8354727-policy
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# if there are conflicts, follow the instructions given by git merge
git commit -m "Merge master"
git push |
|
@mhaessig this pull request can not be integrated into git checkout JDK-8354727-policy
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push |
|
The changes to the files |
|
This PR fix the failure https://bugs.openjdk.org/browse/JDK-8359685 in linux-x64 & (core number = 256) |
This undid cf78925 changes. Something wrong was with merge. |
|
Changes looks fine. |
I fixed that in the latest commit. Thank you for pointing it out. |
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.
Good.
|
I think this PR ready to integrate |
|
If you merge from current master, windows builds are going to be fixed as well. |
|
Thank you for your reviews! /integrate |
|
Going to push as commit f2ef809.
Your commit was automatically rebased without conflicts. |
Running
on a machine with more than 285 cores, this would fail with the message that the specified
NonNMethodCodeHeapSizeis too small to fit all compiler buffers (instead of failing because the sum of the heaps is larger than theReservedCodeCacheSize). Hence, the calculated compiler count is too high. This is due to CompilationPolicy::initialize() checking how many compiler buffers fit into theReservedCodeCacheSize. However, in the case above, this is significantly larger thanNonNMethodCodeHeapSize(especially on a debug build) and causes a check changed in #17244 to fail. That check was changed to check that all compiler buffers fit into theNonNMethodCodeHeapinstead of theNonNMethodCodeHeaphaving at least a size ofCodeCacheMinimumUseSpace.Changes
This PR fixes the calculation of the
CICompilerCountergonomic. Firstly, @shipilev kindly provided a fix for the compiler buffer size used in the calculation is also correct if we only have C2. Secondly,NonNMethodHeapSizeis used as the maximum buffer size available for compilers buffers in the calculation of the maximum number of compiler threads instead ofReservedCodeCacheSize. Therefore, the check failing in the explanation above can never fail because we set the number of compiler threads only so high that they will always fit into theNonNMethodCodeHeap.This change changes how many compiler threads are created by the
CICompilerCountergonomic. For the default valueNonNMethodCodeHeapSize=5Mthis limit is 24 compiler threads on a system 285 cores or more for product builds and 20 threads for debug builds on a system with 145 cores or more.Testing
Progress
Issue
Reviewers
Contributors
<shade@openjdk.org>Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/25872/head:pull/25872$ git checkout pull/25872Update a local copy of the PR:
$ git checkout pull/25872$ git pull https://git.openjdk.org/jdk.git pull/25872/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 25872View PR using the GUI difftool:
$ git pr show -t 25872Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/25872.diff
Using Webrev
Link to Webrev Comment