Hotspot should support multiple large page sizes on Windows#23
Open
nitinsingh130519 wants to merge 1 commit intomainfrom
Open
Hotspot should support multiple large page sizes on Windows#23nitinsingh130519 wants to merge 1 commit intomainfrom
nitinsingh130519 wants to merge 1 commit intomainfrom
Conversation
…SFT OpenJDK on Windows
swesonga
reviewed
Aug 20, 2024
dhanalla
reviewed
Aug 28, 2024
| bool warn_on_failure = !FLAG_IS_DEFAULT(UseLargePages) || | ||
| !FLAG_IS_DEFAULT(LargePageSizeInBytes); | ||
|
|
||
| #define WARN(msg) if (warn_on_failure) { warning(msg); } |
There was a problem hiding this comment.
make the macro to allow variable parameters
#define WARN(...) if (warn_on_failure) { warning(VA_ARGS); }
There was a problem hiding this comment.
i made this change in upstream PR openjdk#20758
also validated the gtest
dhanalla
reviewed
Aug 28, 2024
| size = LargePageSizeInBytes; | ||
| } else { | ||
| char buffer[256]; | ||
| snprintf(buffer, sizeof(buffer), "The specified large page size (%d) is not a multiple of the minimum large page size (%d), defaulting to minimum page size.", LargePageSizeInBytes, size); |
There was a problem hiding this comment.
use macro WARN after making it to accept variable parameters.
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 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.
JBS issue https://bugs.openjdk.org/browse/JDK-8338136
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 to remove 4MB constraint was influenced by insights from Linux's implementation strategies. The implementation supports multiple large page sizes , specifically excluding the IA32 architecture.
Key changes and bug fixes include enabling Windows support for multiple huge page sizes with -XX:LargePageSizeInBytes, and utilizing logic from JDK-8271195 to use the largest available large page size smaller than LargePageSizeInBytes when available.
This update removes the 4MB limit on AMD64 for Windows, 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.