-
Notifications
You must be signed in to change notification settings - Fork 148
8313319: [linux] mmap should use MAP_FIXED_NOREPLACE if available #2476
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
base: master
Are you sure you want to change the base?
Conversation
Backport-of: 3699666c9325b38d287e1d4d2576f8e3a662ae81
|
👋 Welcome back schernyshev! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
This backport pull request has now been updated with issue from the original commit. |
|
|
Webrevs
|
|
/approval request Clean backport, use MAP_FIXED_NOREPLACE flag when supported by kernel, this prevents unnecessary mmap-munmap cycle in systems that do not honor the address hint in mmap() system call. |
|
Just to be clear, this downport's intent is performance, not outright failures, right? I only know of two cases where we rely on fixed addressing, ZGC being one of them. The other would be class space reservation on Arm64. Do you see any other problems with the rand kernel patch outside of ZGC? |
|
Hi Thomas, thanks four your note! Yes, this backport is performance only. I haven't seen other problems of randmmap-patched kernel except for one with ZGC. UPD. I missed the double definition of MAP_FIXED_NOREPLACE that came from JDK-8330520. |
|
Hmm
Hmm. Something must have gone wrong with the backport of JDK-8330520. It took parts of 8313319 with it, it seems. |
tstuefe
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.
Patch is okay.
Exactly. It was spotted in the review and passed nevertheless |
Thank you! |
Hi all,
Please review the backport of JDK-8313319 that prevents unnecessary mmap-munmap cycle in systems that do not honor the address hint when mmapping memory without MAP_FIXED. Please see more details in #2475.
This is (almost) a clean backport, with only a minor context conflict due to JDK-8315923 hasn't been backported to JDK 21.UPD: Apart from a minor context issue related to JDK-8315923, there was a second definition of MAP_FIXED_NOREPLACE, introduced by JDK-8330520 backport.
Testing:
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk21u-dev.git pull/2476/head:pull/2476$ git checkout pull/2476Update a local copy of the PR:
$ git checkout pull/2476$ git pull https://git.openjdk.org/jdk21u-dev.git pull/2476/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 2476View PR using the GUI difftool:
$ git pr show -t 2476Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk21u-dev/pull/2476.diff
Using Webrev
Link to Webrev Comment