RFR: 8244752: Enable Linux support for multiple huge page sizes -XX:LargePageSizeInBytes
ivan.walulya at oracle.com
Fri May 15 08:32:31 UTC 2020
> On 15 May 2020, at 09:55, stefan.johansson at oracle.com wrote:
> Hi Ivan,
> On 2020-05-14 15:42, Ivan Walulya wrote:
>> 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://lwn.net/Articles/533499/><https://urldefense.com/v3/__https://lwn.net/Articles/533499/__;!!GqivPVa7Brio!LmDQYi0jNiIRDJQ6zF29nJULj1sCUcKePWCy8dlGpPKazvDIpkndYUSSAz8-tgpCER8$ <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/
> Looks good,
More information about the hotspot-gc-dev