RFR: 8244752: Enable Linux support for multiple huge page sizes -XX:LargePageSizeInBytes

Ivan Walulya ivan.walulya at oracle.com
Thu May 14 18:15:43 UTC 2020


Thanks Thomas.

> On 14 May 2020, at 18:58, Thomas Stüfe <thomas.stuefe at gmail.com> wrote:
> 
> Thanks, 
> 
> sorry for addressing you with the wrong name, I was writing another mail at the same time and got the names mixed up.
No Problem
> 
> The change looks good now. Thank you for making the comment clearer. I guess at some point we can try to find a better abstraction for large pages at the generic os:: namespace level - some platforms have just one, some have multiple. Of those who have multiple, some have the notion of a default size, but some (eg AIX, and our closed Hpux port) have not, there, all page sizes are treated equal.
> 
> But this is way out of scope for your proposed change. Thanks for your patience.
> 
> ..Thomas
> 
> 
> On Thu, May 14, 2020 at 3:44 PM Ivan Walulya <ivan.walulya at oracle.com <mailto:ivan.walulya at oracle.com>> 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://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/ <http://cr.openjdk.java.net/~iwalulya/8244752/02/>
> 
> //Ivan




More information about the hotspot-gc-dev mailing list