Skip to content
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-8263884: Clean up os::is_allocatable() across Posix platforms #3092

Closed

Conversation

tstuefe
Copy link
Member

@tstuefe tstuefe commented Mar 19, 2021

There exists a function os::is_allocatable() which is really only used on 32bit platforms if AggressiveHeap is set. That function tests if a given memory size can be mapped. A variant of this function exists for every os_cpu variant. They don't really differ much. Some of the 64bit only variants (eg ppc) never bothered to implement this.

I am not sure how much worth this function has, but it could at least be unified across POSIX platforms, and it should not use os::reserve_memory but plain raw mmap. There is no need for it to go through our whole reservation layer (eg NMT) if it just immediately releases the memory again.

I also would like NMT to be kept out of this since I work on NMT late stage initialization (JDK-8256844) and would like to avoid calling any of our reservation APIs before NMT initialization ran.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8263884: Clean up os::is_allocatable() across Posix platforms

Reviewers

Download

To checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/3092/head:pull/3092
$ git checkout pull/3092

To update a local copy of the PR:
$ git checkout pull/3092
$ git pull https://git.openjdk.java.net/jdk pull/3092/head

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 19, 2021

👋 Welcome back stuefe! 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 Mar 19, 2021

@tstuefe The following label will be automatically applied to this pull request:

  • hotspot-runtime

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the hotspot-runtime hotspot-runtime-dev@openjdk.org label Mar 19, 2021
@tstuefe tstuefe marked this pull request as ready for review March 19, 2021 17:44
@openjdk openjdk bot added the rfr Pull request is ready for review label Mar 19, 2021
@mlbridge
Copy link

mlbridge bot commented Mar 19, 2021

Webrevs

Copy link
Member

@stefank stefank left a comment

Choose a reason for hiding this comment

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

Looks good

src/hotspot/os/posix/os_posix.cpp Outdated Show resolved Hide resolved
@openjdk
Copy link

openjdk bot commented Mar 24, 2021

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

8263884: Clean up os::is_allocatable() across Posix platforms

Reviewed-by: stefank

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

  • 8120064: 8263781: C2: Cannot hoist independent load above arraycopy
  • 9689863: 8262295: C2: Out-of-Bounds Array Load from Clone Source
  • a678a38: 8263743: redundant lock in SSLSocketImpl
  • 3fcb499: 8263768: JFormattedTextField.AbstractFormatter.getDocumentFilter()/getNavigationFilter() spec doesn't mention what the default impls return and what does it mean
  • 4155533: 8258753: StartTlsResponse.close() hangs due to synchronization issues
  • 3e18330: 8264018: AArch64: NEON loadV2 and storeV2 addressing is wrong
  • 0ff8168: 8258957: DocLint: check for HTML start element at end of body
  • 3d7f912: 8220266: add support for additional metadata in add/remove programs
  • 37f494c: 8260619: Add final modifier to several DataFlavor static fields
  • cfc9aa3: 8264002: Delete outdated assumptions about ColorSpace initialization
  • ... and 91 more: https://git.openjdk.java.net/jdk/compare/b49c5893409879bbfecbf60127a512bcc48d087c...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.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 24, 2021
Copy link
Contributor

@mgkwill mgkwill left a comment

Choose a reason for hiding this comment

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

Seems reasonable to me.

@tstuefe
Copy link
Member Author

tstuefe commented Mar 25, 2021

Thanks, @stefank and @mgkwill !
/integrate

@openjdk openjdk bot closed this Mar 25, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Mar 25, 2021
@openjdk
Copy link

openjdk bot commented Mar 25, 2021

@tstuefe Since your change was applied there have been 102 commits pushed to the master branch:

  • a9d287a: 8260388: Listing (sub)packages at package level of API documentation
  • 8120064: 8263781: C2: Cannot hoist independent load above arraycopy
  • 9689863: 8262295: C2: Out-of-Bounds Array Load from Clone Source
  • a678a38: 8263743: redundant lock in SSLSocketImpl
  • 3fcb499: 8263768: JFormattedTextField.AbstractFormatter.getDocumentFilter()/getNavigationFilter() spec doesn't mention what the default impls return and what does it mean
  • 4155533: 8258753: StartTlsResponse.close() hangs due to synchronization issues
  • 3e18330: 8264018: AArch64: NEON loadV2 and storeV2 addressing is wrong
  • 0ff8168: 8258957: DocLint: check for HTML start element at end of body
  • 3d7f912: 8220266: add support for additional metadata in add/remove programs
  • 37f494c: 8260619: Add final modifier to several DataFlavor static fields
  • ... and 92 more: https://git.openjdk.java.net/jdk/compare/b49c5893409879bbfecbf60127a512bcc48d087c...master

Your commit was automatically rebased without conflicts.

Pushed as commit d602ae0.

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

@tstuefe tstuefe deleted the JDK-8263884-unify-os-is_allocatable branch April 26, 2021 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-runtime hotspot-runtime-dev@openjdk.org integrated Pull request has been integrated
3 participants