Skip to content

Conversation

@JoKern65
Copy link

@JoKern65 JoKern65 commented Jan 27, 2025

Beginning with AIX 7.3 TL1 mmap() supports 64K memory pages. As an enhancement, during the initialization of the VM the availability of this new feature is examined. If the 64K pages are supported the VM will use mmap() with 64K pages instead of shmget()/shmat() with 64K pages due to the bad 256M alignment of shmget()/shmat().

In this downport to jdk21 we want to support the new AIX 7.3 TL1 feature, but with some differences explained here:

  • static void query_multipage_support() in src/hotspot/os/aix/os_aix.cpp
    The structure of the function was changed identically in head and jdk21. Because jdk21 beforehand used trcVerbose(...) and head beforehand used log_warning(pagesize)(...) this seems to be a difference, but I just kept the tracing functions as the were before.

  • src/hotspot/share/memory/virtualspace.cpp
    Adding the use of os::Aix::supports_64K_mmap_pages() introduces the dependency to the header src/hotspot/os/aix/os_aix.hpp. In head this header was included with #include "runtime/os.inline.hpp" beforehand by dependant code added after jdk21. Therefore I have to include #include "runtime/os.inline.hpp" explicitely in virtualspace.cpp. #include "runtime/os.hpp" can be dropped instead.

  • src/hotspot/share/runtime/os.cpp
    Function char* os::attempt_reserve_memory_between() does not exist in jdk21, so I do not have to port the adoptions of head there.

  • TEST_VM(os, aix_reserve_at_non_shmlba_aligned_address) moved from test/hotspot/gtest/runtime/test_os.cpp to test/hotspot/gtest/runtime/test_os_aix.cpp
    This test function does not exist in jdk21, so there is nothing to move.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • JDK-8334371 needs maintainer approval

Issue

  • JDK-8334371: [AIX] Beginning with AIX 7.3 TL1 mmap() supports 64K memory pages (Enhancement - P4 - Approved)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk21u-dev.git pull/1362/head:pull/1362
$ git checkout pull/1362

Update a local copy of the PR:
$ git checkout pull/1362
$ git pull https://git.openjdk.org/jdk21u-dev.git pull/1362/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1362

View PR using the GUI difftool:
$ git pr show -t 1362

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk21u-dev/pull/1362.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 27, 2025

👋 Welcome back jkern! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Jan 27, 2025

@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:

8334371: [AIX] Beginning with AIX 7.3 TL1 mmap() supports 64K memory pages

Reviewed-by: mdoerr, stuefe
Backport-of: ced99066354fc6a32c587b9e3c35b07e26d3452e

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 22 new commits pushed to the master branch:

  • 981ec16: 8347911: Limit the length of inflated text chunks
  • caa7cc2: 8338571: [TestBug] DefaultCloseOperation.java test not working as expected wrt instruction after JDK-8325851 fix
  • 80253a3: 8343491: javax/management/remote/mandatory/connection/DeadLockTest.java failing with NoSuchObjectException: no such object in table
  • d0fbffd: 8226938: [TEST_BUG]GTK L&F: There is no Details button in FileChooser Dialog
  • 9a2988c: 8340078: Open source several 2D tests
  • 12070ca: 8332917: failure_handler should execute gdb "info threads" command on linux
  • 42f0ebc: 8330647: Two CDS tests fail with -UseCompressedOops and UseSerialGC/UseParallelGC
  • 7b7aa75: 8329692: Add more details to FrameStateTest.java test instructions
  • ba27543: 8325042: Remove unused JVMDITools test files
  • 69e8c20: 8320691: Timeout handler on Windows takes 2 hours to complete
  • ... and 12 more: https://git.openjdk.org/jdk21u-dev/compare/91e7582724f78ac924ed8003a2c80e6dc731517f...master

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 (@TheRealMDoerr, @tstuefe) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot changed the title Backport ced99066354fc6a32c587b9e3c35b07e26d3452e 8334371: [AIX] Beginning with AIX 7.3 TL1 mmap() supports 64K memory pages Jan 27, 2025
@openjdk
Copy link

openjdk bot commented Jan 27, 2025

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added backport Port of a pull request already in a different code base rfr Pull request is ready for review labels Jan 27, 2025
@mlbridge
Copy link

mlbridge bot commented Jan 27, 2025

Webrevs

Copy link
Contributor

@TheRealMDoerr TheRealMDoerr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change differs significantly from the original change. Please explain all differences.

Copy link
Contributor

@TheRealMDoerr TheRealMDoerr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

#include "runtime/globals_extension.hpp"
#include "runtime/java.hpp"
#include "runtime/os.hpp"
#include "runtime/os.inline.hpp"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that including os.hpp is no longer needed when you include os.inline.hpp.

@openjdk
Copy link

openjdk bot commented Feb 3, 2025

⚠️ @JoKern65 This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

Copy link
Member

@tstuefe tstuefe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Patch looks good. Thanks for doing this.

After 20 years we can finally start reducing the crud around 64k page handling. If 64K page handling is ubiquitous, you will be able to throw out the System V shm allocation path, and all that vmem_xxx stuff we wrote 20 years ago.

@JoKern65
Copy link
Author

JoKern65 commented Feb 4, 2025

/approval JDK-8334371 request backport to support new OS Release AIX 7.3. All needed changes compared to head described in description of this PR.

@openjdk
Copy link

openjdk bot commented Feb 4, 2025

@JoKern65
JDK-8334371: The approval request has been created successfully.

@openjdk openjdk bot added approval Requires approval; will be removed when approval is received ready Pull request is ready to be integrated and removed approval Requires approval; will be removed when approval is received labels Feb 4, 2025
@JoKern65
Copy link
Author

JoKern65 commented Feb 5, 2025

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Feb 5, 2025
@openjdk
Copy link

openjdk bot commented Feb 5, 2025

@JoKern65
Your change (at version 8b5a6d2) is now ready to be sponsored by a Committer.

@TheRealMDoerr
Copy link
Contributor

/sponsor

@openjdk
Copy link

openjdk bot commented Feb 5, 2025

Going to push as commit 29a5de0.
Since your change was applied there have been 22 commits pushed to the master branch:

  • 981ec16: 8347911: Limit the length of inflated text chunks
  • caa7cc2: 8338571: [TestBug] DefaultCloseOperation.java test not working as expected wrt instruction after JDK-8325851 fix
  • 80253a3: 8343491: javax/management/remote/mandatory/connection/DeadLockTest.java failing with NoSuchObjectException: no such object in table
  • d0fbffd: 8226938: [TEST_BUG]GTK L&F: There is no Details button in FileChooser Dialog
  • 9a2988c: 8340078: Open source several 2D tests
  • 12070ca: 8332917: failure_handler should execute gdb "info threads" command on linux
  • 42f0ebc: 8330647: Two CDS tests fail with -UseCompressedOops and UseSerialGC/UseParallelGC
  • 7b7aa75: 8329692: Add more details to FrameStateTest.java test instructions
  • ba27543: 8325042: Remove unused JVMDITools test files
  • 69e8c20: 8320691: Timeout handler on Windows takes 2 hours to complete
  • ... and 12 more: https://git.openjdk.org/jdk21u-dev/compare/91e7582724f78ac924ed8003a2c80e6dc731517f...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Feb 5, 2025
@openjdk openjdk bot closed this Feb 5, 2025
@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Feb 5, 2025
@openjdk openjdk bot removed rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Feb 5, 2025
@openjdk
Copy link

openjdk bot commented Feb 5, 2025

@TheRealMDoerr @JoKern65 Pushed as commit 29a5de0.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Port of a pull request already in a different code base integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

3 participants