Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8261636

The test mapping in hugetlbfs_sanity_check should consider LargePageSizeInBytes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 17
    • Fix Version/s: 17
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
      gc
    • Resolved In Build:
      b12
    • OS:
      linux

      Description

      Currently the sanity check performed for hugetlbfs large pages tries a mapping using the default large page size. If the flag LargePageSizeInBytes is set it would make sense to perform the sanity check taking this into consideration.

      For example, if a Linux system is configured with 1g pages but no 2m pages (but this is still the default page size), the sanity check will fail leaving the system not trying to use hugetlbfs pages at all.

      The updated sanity check should do something like this before performing the mapping to add the needed flag:
      if (os::large_page_size() != default_large_page_size()) {
        flags |= (exact_log2(os::large_page_size()) << MAP_HUGE_SHIFT);
      }

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sjohanss Stefan Johansson
              Reporter:
              sjohanss Stefan Johansson
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: