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

The test mapping in hugetlbfs_sanity_check should consider LargePageSizeInBytes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 17
    • 17
    • hotspot
    • None
    • gc
    • b12
    • linux

      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);
      }

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

              Created:
              Updated:
              Resolved: