RFR: 8244752: Enable Linux support for multiple huge page sizes -XX:LargePageSizeInBytes
Ivan Walulya
ivan.walulya at oracle.com
Thu May 14 13:42:16 UTC 2020
Hi Thomas,
Thanks for the comments
>
> 2952 // If MAP_HUGETLB is set, and the system supports multiple huge page sizes,
> 2953 // flag bits [26:31] can be used to encode the log2 of the desired huge page size.
> 2954 // Otherwise the system's default huge page size will be used.
> 2955 // See mmap(2) man page for more info (since Linux 3.8).
> 2956 // https://lwn.net/Articles/533499/ <https://urldefense.com/v3/__https://lwn.net/Articles/533499/__;!!GqivPVa7Brio!LmDQYi0jNiIRDJQ6zF29nJULj1sCUcKePWCy8dlGpPKazvDIpkndYUSSAz8-tgpCER8$>
> 2957 #ifndef MAP_HUGE_SHIFT
> 2958 #define MAP_HUGE_SHIFT 26
> 2959 #endif
>
> I may be slow but I needed a while to understand this comment; as a standalone comment it is confusing. What flags? Could you clarify the comment a bit, especially making clear that "flags" means mmap flags to be used in conjunction with MAP_HUGE_TLB?
>
> ---
>
> bool os::Linux::is_valid_large_page_size(size_t large_page_size)
>
> Note that os::Linux::is_valid_large_page_size() sounds rather inconspicuous; as a caller, without looking at the implementation, I would not have assumed it does file IO.
Refactored to address the above comments
New webrev: http://cr.openjdk.java.net/~iwalulya/8244752/02/
//Ivan
More information about the hotspot-gc-dev
mailing list