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

runtime/os/TestTracePageSizes.java fails to recognizes VMAs that are clearly THP backed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • 22
    • 22
    • hotspot

      The test only recognizes VMAs that had been explicitly madvised for THP. It does not recognize VMAs that had been backed by THPs without being madvised (in THP "always" mode).

      That is because the test only scans for the VM_xx flags. So it misses VMAs like this:

      ```
      f9c00000-ffe00000 rw-p 00000000 00:00 0
      Size: 100352 kB
      KernelPageSize: 4 kB
      MMUPageSize: 4 kB
      Rss: 100352 kB
      Pss: 100352 kB
      Shared_Clean: 0 kB
      Shared_Dirty: 0 kB
      Private_Clean: 0 kB
      Private_Dirty: 100352 kB
      Referenced: 100352 kB
      Anonymous: 100352 kB
      LazyFree: 0 kB
      AnonHugePages: 100352 kB
      ShmemPmdMapped: 0 kB
      FilePmdMapped: 0 kB
      Shared_Hugetlb: 0 kB
      Private_Hugetlb: 0 kB
      Swap: 0 kB
      SwapPss: 0 kB
      Locked: 0 kB
      THPeligible: 1
      VmFlags: rd wr mr mw me ac sd
      ```

      The best way to go about this would be to check for "THPelegible". But we need to check in which kernel version that came, and add a fallback for older kernels.

      We also could look at AnonHugePages, but that could show 0 if khugepaged is slow and lazy.

            stuefe Thomas Stuefe
            stuefe Thomas Stuefe
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: