-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
JDK-8322943: runtime/CompressedOops/CompressedClassPointers.java fails on AIX #18105
Conversation
👋 Welcome back jkern! A progress list of the required criteria for merging this PR into |
Webrevs
|
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.
I don't have a AIX device to run the related test. But the patch looks good.
A trivially possible problem is that it seems not so good to repeat the same comments in all the code places. But I don't have a better alternative way to solve such issue. So I am OK with it now.
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.
I don't think we need to cater to the 4K page mode. It was originally added for AIX versions that don't support 64K pages. AIX 4.xx IIRC. The need for it should be long gone.
I am not doing AIX coding anymore, but my advice would be to simplify and require 64k pages always. WRT this change, the 4K page handling is certainly not needed. Just hardcode to SHMLBA. Or 256M, whatever causes the least amount of ifdefs.
Other than that, please slim the fix down to the necessary. The many copypasted sections are really not pretty.
The only really needed parts are the one in os::reserve_memory_inbetween. This is a small issue, let's keep the patch small and confined.
os::vm_page_size() == 4*K ? 4*K : 256*M; | ||
#else | ||
os::vm_allocation_granularity(); | ||
#endif |
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.
Unnecessary for the fix. And the old code does basically the same, only less verbose.
Hi @tstuefe, this is a fix for an existing issue. Changing the behavior of the AIX allocation is not the intention of this fix. Modernizing the AIX memory allocation is a possible follow-up. Also we need to backport this, so it should be fix-only. Thus I think we should really do the 4K/256M distiction here to match the allocation implemented in os_aix.cpp. |
Hi @GoeLin , not sure what you understood from my comment, but it was not what I was writing.
Which I did not propose? Quoting myself here: "Other than that, please slim the fix down to the necessary...
Backport to where?
Which does not follow from "it should be a minimal fix". The 4K scenario is fictional. And even if it were not, aligning reservations to SHMLBA is never wrong, not even if you use mmap. So why the added complexity? To be clear, I dislike it because of the the n times copy-pasted logic spread over the code base. If it were just one hunk in os.cpp, I would not care about the 4K page mode. |
Hi @tstuefe, I read and understood all of your reply. I was referring to your "I don't think we need to cater to the 4K page mode." statement. The 4K page mode is current state of the AIX implementation, and in my eyes the error is in virtualspace and os.cpp to use a wrong alignement for the attach points, not in os_aix.cpp. For the n-times copied logic: There are only two places in the JVM coding. The others are in tests. Obviously, the tests must be adapted to the JVM coding. |
With my new commit I tried to be less verbose. |
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.
Okay. Thanks for reducing the patch size.
@JoKern65 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 64 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. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@lgxbslgx, @tstuefe) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
/integrate |
/sponsor |
Going to push as commit 997e615.
Your commit was automatically rebased without conflicts. |
Even after recent fixes like
https://bugs.openjdk.org/browse/JDK-8305765
the test runtime/CompressedOops/CompressedClassPointers.java fails on AIX.
This error results from the fact, that on AIX the shmat() allocation granularity is 256MB instead of the standard Pagesize (4KB or 64KB).
Because my first proposal (PR 17708) of introducing a new method os::vm_shm_allocation_granularity() in the shared hotspot code was rejected I now encapsulate the difference in ifdef AIX brackets.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/18105/head:pull/18105
$ git checkout pull/18105
Update a local copy of the PR:
$ git checkout pull/18105
$ git pull https://git.openjdk.org/jdk.git pull/18105/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 18105
View PR using the GUI difftool:
$ git pr show -t 18105
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/18105.diff
Webrev
Link to Webrev Comment