Note: This backport CSR is replica of the original CSR https://bugs.openjdk.org/browse/JDK-8339798
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.
- csr of
-
JDK-8343895 Hotspot should support multiple large page sizes on Windows
- Open