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

Hotspot should support multiple large page sizes on Windows

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P3 P3
    • 24
    • hotspot
    • None
    • behavioral
    • low
    • Hide
      A new flag has been added to allow users to opt in to the new behavior, which supports large pages greater than 4MB on the Windows AMD64 architecture. This helps avoid unexpected changes to applications, as the new behavior only takes effect when the JVM flag is enabled.
      Show
      A new flag has been added to allow users to opt in to the new behavior, which supports large pages greater than 4MB on the Windows AMD64 architecture. This helps avoid unexpected changes to applications, as the new behavior only takes effect when the JVM flag is enabled.
    • add/remove/modify command line option
    • Implementation

      Summary

      Enable hotspot to use multiple large page sizes on Windows AMD64 architecture.

      Problem

      OpenJDK on Windows only supports large pages of up to 4MB on IA32/AMD64 (as discussed in the mailing list at https://mail.openjdk.org/pipermail/hotspot-runtime-dev/2023-October/065382.html). This limitation should be removed for the Windows AMD64 architecture.

      Solution

      Add a new JVM flag (-XX:+EnableAllLargePageSizesForWindows) that defaults to false. This flag allows users to opt in to the new large page handling behavior and provides a warning when the requested large page size is not a multiple of the OS minimum page size by populating the valid page size list with all sizes starting from the minimum page size, including each subsequent size that is a multiple of 2 (i.e., doubling each time) until the size reaches the large page size. With this change, the list is populated on non-IA32 architectures of Windows.

      Specification

      An option EnableAllLargePageSizesForWindows of type bool has been added to the list of HotSpot JVM options.

      • When -XX:+EnableAllLargePageSizesForWindows is passed, it allows applications on Windows AMD64 to use large pages (greater than 4MB).

      • When -XX:-EnableAllLargePageSizesForWindows is used, or if the JVM flag is not specified, there is no change to the current behavior.

            darcy Joe Darcy
            swesonga Saint Wesonga
            David Holmes
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: