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

Remove support for UseSHM

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 22
    • 17
    • hotspot
    • b19
    • linux

    Description

      Hotspot currently supports two ways to make use of explicit large pages (huge pages):
      - UseHugeTLBFS - explicitly mmap() large pages using MAP_HUGETLB
      - UseSHM - create a shared memory segment using shmget() and SHM_HUGETLB

      Both these requires that large pages are configured and pre-allocated, the number of currently allocated large pages can be seen with:
      > sysctl vm.nr_hugepagessee

      See the kernel documentation for more information:
      https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt

      The share memory approach also requires the process to be privileged (have the capability to lock memory) and that the system is configured to allow large shared memory segments. To get the current max value:
      > sysctl kernel.shmmax

      There are very few if any pros with the USeSHM approach and we should investigate if we can remove support for it.

      If we remove UseSHM, we also can remove UseHugeTLBFS, since it is the negation of the other and now implicitly and unconditionally true if we run with static hugepages.

      Attachments

        Issue Links

          Activity

            People

              stuefe Thomas Stuefe
              sjohanss Stefan Johansson
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: