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

8261636: The test mapping in hugetlbfs_sanity_check should consider LargePageSizeInBytes #2695

Closed
wants to merge 2 commits into from

Conversation

@kstefanj
Copy link
Contributor

@kstefanj kstefanj commented Feb 23, 2021

When explicit large pages are enabled we do a sanity check to test if there are large pages configured. This sanity check just tests if there are any pages available of the systems default large page size. When the flag LargePageSizeInBytes is specified the JVM will try to use this large page size for all its mapping, except for the first sanity mapping. This can lead to large pages being disabled because the sanity mapping failed, while there are still plenty of pages available of the size specified by LargePageSizeInBytes.

The fix is to simply take the large page size into consideration in the sanity-check, making sure the correct flags are passed when needed.

Testing

  • Manual testing verifying the problem when for example only 1g pages are available. Before the fix these large pages could not be used (unless the default large page size was changed to 1g or there were also 2m pages configured).

Progress

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

Issue

  • JDK-8261636: The test mapping in hugetlbfs_sanity_check should consider LargePageSizeInBytes

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/2695/head:pull/2695
$ git checkout pull/2695

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Feb 23, 2021

👋 Welcome back sjohanss! 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.

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Feb 23, 2021

@kstefanj 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.

Loading

@kstefanj kstefanj marked this pull request as ready for review Feb 23, 2021
@openjdk openjdk bot added the rfr label Feb 23, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Feb 23, 2021

Webrevs

Loading

Copy link
Contributor

@tschatzl tschatzl left a comment

Since the exact same code to add these bits is now three times in that file, it may be interesting to add and use a (static?) method?

Loading

Added helper for adding the large page size flag when needed.
@kstefanj
Copy link
Contributor Author

@kstefanj kstefanj commented Mar 1, 2021

Since the exact same code to add these bits is now three times in that file, it may be interesting to add and use a (static?) method?

Good point, that makes sense.

Loading

Copy link
Contributor

@tschatzl tschatzl left a comment

A cpp file local static method would have been fine with me too, but this is as good.

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Mar 1, 2021

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

8261636: The test mapping in hugetlbfs_sanity_check should consider LargePageSizeInBytes

Reviewed-by: tschatzl, iwalulya

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 master branch:

  • 702ca62: 8262185: G1: Prune collection set candidates early
  • 8bc8542: 8262195: Harden tests that use the HostsFileNameService (jdk.net.hosts.file property)
  • 20c93b3: 8261914: IfNode::fold_compares_helper faces non-canonicalized bool when running JRuby JSON workload
  • ddd550a: 8261308: C2: assert(inner->is_valid_counted_loop(T_INT) && inner->is_strip_mined()) failed: OuterStripMinedLoop should have been removed
  • 03d888f: 8261804: Remove field _processing_is_mt, calculate it instead
  • 6800ba4: 8257500: Drawing MultiResolutionImage with ImageObserver "leaks" memory
  • 65a245e: 8262329: Fix JFR parser exception messages
  • a4c2496: 8259535: ECDSA SignatureValue do not always have the specified length
  • 2515c42: 8262332: serviceability/sa/ClhsdbJhisto.java fails with Test ERROR java.lang.RuntimeException: 'ParselTongue' missing from stdout/stderr
  • 07061fc: 8256417: Exclude TestJFRWithJMX test from running with PodMan
  • ... and 54 more: https://git.openjdk.java.net/jdk/compare/29c72631ee3f4f1f88a36f25b933642ea9659681...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.

Loading

@openjdk openjdk bot added the ready label Mar 1, 2021
@kstefanj
Copy link
Contributor Author

@kstefanj kstefanj commented Mar 1, 2021

A cpp file local static method would have been fine with me too, but this is as good.

Then I would have had to pass the default_large_page_size() or changed its visibility, so I went with making the helper a member.

Loading

Copy link
Member

@walulyai walulyai left a comment

Lgtm!

Loading

@kstefanj
Copy link
Contributor Author

@kstefanj kstefanj commented Mar 1, 2021

Thanks Thomas and Ivan for the reviews :)

Loading

@kstefanj
Copy link
Contributor Author

@kstefanj kstefanj commented Mar 1, 2021

/integrate

Loading

@openjdk openjdk bot closed this Mar 1, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Mar 1, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Mar 1, 2021

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

  • 702ca62: 8262185: G1: Prune collection set candidates early
  • 8bc8542: 8262195: Harden tests that use the HostsFileNameService (jdk.net.hosts.file property)
  • 20c93b3: 8261914: IfNode::fold_compares_helper faces non-canonicalized bool when running JRuby JSON workload
  • ddd550a: 8261308: C2: assert(inner->is_valid_counted_loop(T_INT) && inner->is_strip_mined()) failed: OuterStripMinedLoop should have been removed
  • 03d888f: 8261804: Remove field _processing_is_mt, calculate it instead
  • 6800ba4: 8257500: Drawing MultiResolutionImage with ImageObserver "leaks" memory
  • 65a245e: 8262329: Fix JFR parser exception messages
  • a4c2496: 8259535: ECDSA SignatureValue do not always have the specified length
  • 2515c42: 8262332: serviceability/sa/ClhsdbJhisto.java fails with Test ERROR java.lang.RuntimeException: 'ParselTongue' missing from stdout/stderr
  • 07061fc: 8256417: Exclude TestJFRWithJMX test from running with PodMan
  • ... and 54 more: https://git.openjdk.java.net/jdk/compare/29c72631ee3f4f1f88a36f25b933642ea9659681...master

Your commit was automatically rebased without conflicts.

Pushed as commit 0a7fff4.

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

Loading

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