Enhance Large Page Support in MSFT OpenJDK for Windows: Multi-Size Page Handling Upgrade#13
Open
nitinsingh130519 wants to merge 32 commits intomicrosoft:mainfrom
Open
Conversation
Windows 11 and Windows Server 2022 make processes and their threads span all processor groups. The correct number of processors can be safely used on these operating systems.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces enhancements to the handling of large page sizes in the Microsoft OpenJDK for Windows systems, aiming to align its capabilities with those observed on Linux platforms. Investigation through SPECJBB benchmarks across various platforms revealed a 16-year-old limitation in handling large pages over 4MB for IA32/AMD64 architectures, with no such constraints for Windows on ARM64.
The goal of this change is to overcome the 4MB large page size limitation, thereby enhancing Windows' large page support to match Linux's more flexible handling capabilities. This decision was influenced by issues observed with code cache and large page utilization, alongside insights from Linux's implementation strategies. The implementation supports multiple large page sizes on recent versions of Windows (Windows Client version >=11 and Windows Server version >=22), specifically excluding the IA32 architecture.
Key changes and bug fixes include enabling Linux support for multiple huge page sizes with
-XX:LargePageSizeInBytes, adapting similar logic for Windows support, and utilizing logic from JDK-8271195 to use the largest available large page size smaller thanLargePageSizeInByteswhen available. This approach is further supported by addressing several JDK bug reports and enhancement requests related to large page handling, ensuring a comprehensive update to large page management.This update removes the 4MB limit on AMD64 for Windows 11+ and Server 22+, populating the shared array to enable fallback options on all architectures except IA32. The implementation introduces an experimental flag, defaulting to FALSE, to facilitate testing and gradual adoption of these changes. The flag allows users to opt-in to the new large page handling logic, with a warning mechanism implemented for cases where the requested large page size is not a multiple of the OS minimum page size.