Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance Large Page Support in MSFT OpenJDK for Windows: Multi-Size Page Handling Upgrade #13

Open
wants to merge 32 commits into
base: main
Choose a base branch
from

Conversation

nitinsingh130519
Copy link

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 than LargePageSizeInBytes when 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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants