-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8266489: Enable G1 to use large pages on Windows when region size is larger than 2m #3927
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
|
👋 Welcome back sjohanss! A progress list of the required criteria for merging this PR into |
|
/label remove hotspot-runtime |
|
@kstefanj |
|
@kstefanj |
tschatzl
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.
Lgtm.
|
@kstefanj 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 112 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 |
|
@kstefanj Since your change was applied there have been 112 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 7b736ec. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Please review this change to the large page reservation code on Windows to allow G1 to make use of large pages even if the region size is larger than 2m.
Summary
The code handling large pages reservation on Windows fall back to using normal pages if the alignment is larger than the large page size. For G1 this is a problem, because the region size will define the heap alignment which in turn is the alignment used to reserve large pages. This means that for heaps larger than 4G (where the default regions size will be 4m or larger), G1 won't be able to use large pages.
The fix is to handle the case with a larger alignment separately, and first reserve an address that is aligned to the requested alignment, and then use this to reserve the large pages. For the case where there already is a requested address the alignment is not a problem, since that address must already be aligned by the upper layers.
There are two different "ways" to reserve large pages on Windows, one where each page is a separate reservation (used with
UseNUMAInterleaving) and one where the whole range is a single reservation. I've split those two out into helper functions, since both cases needs to be handled both when finding an aligned address and not. I hope the new code should be fairly easy to follow.Testing
Manual testing to verify the different cases work. Performance testing to see that we actually get large pages and see an improvement. We do! Currently running some more testing together with
UseNUMAInterleavingto make sure that works as well.Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/3927/head:pull/3927$ git checkout pull/3927Update a local copy of the PR:
$ git checkout pull/3927$ git pull https://git.openjdk.java.net/jdk pull/3927/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 3927View PR using the GUI difftool:
$ git pr show -t 3927Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/3927.diff