RFR: 8261636: The test mapping in hugetlbfs_sanity_check should consider LargePageSizeInBytes [v2]

Stefan Johansson sjohanss at openjdk.java.net
Mon Mar 1 10:22:02 UTC 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).

Stefan Johansson has updated the pull request incrementally with one additional commit since the last revision:

  8261636: Thomas review
  
  Added helper for adding the large page size flag when needed.

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/2695/files
  - new: https://git.openjdk.java.net/jdk/pull/2695/files/a7fcf1b3..144df02a

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2695&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2695&range=00-01

  Stats: 24 lines in 2 files changed: 11 ins; 10 del; 3 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2695.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2695/head:pull/2695

PR: https://git.openjdk.java.net/jdk/pull/2695


More information about the hotspot-runtime-dev mailing list