RFR: 8256155: Allow multiple large page sizes to be used on Linux [v37]

Thomas Stuefe stuefe at openjdk.java.net
Tue May 18 06:20:59 UTC 2021


On Tue, 18 May 2021 06:11:58 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> Marcus G K Williams has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   kstefanj review comments
>>   
>>   Signed-off-by: Marcus G K Williams <marcus.williams at intel.com>
>
> src/hotspot/os/linux/os_linux.cpp line 3751:
> 
>> 3749:     UseTransparentHugePages = false;
>> 3750:     UseHugeTLBFS = false;
>> 3751:     UseSHM = false;
> 
> Suggestion:
> 
>     UseSHM = false;
>     if (!FLAG_IS_DEFAULT(UseLargePages)) {
>       log_warning(pagesize)("UseLargePages disabled, no large pages configured and available on the system.");
>     }
>     UseLargePages = false;

@mgkwill Okay, that lcm assert has been embarrassingly easy to reproduce and fix (even on x64, by just setting default_large_page_size to 0). Suggested change above.

Slight beauty spot here is that we have now the large page warning spread over two places. Maybe you or @kstefanj have a better proposal. Ideally, we would
- scan default large page
- scan available page sizes
- if no default large page or no multiple page sizes or multiple page sizes do not contain default large page, bail out with error.
But I remember we were not sure if the default large page could possibly be missing from the set of large page sizes, so we correct the value further down.

So, it had nothing to do with 64k. Actually I remember trying to fake it once but since the page size goes into the alignment for committing memory, this is not so easy (we fake it on AIX because of complicated boring reasons, but there we have implicit commit on touch).

Sorry for the 64k wild goose chase.

Cheers, Thomas

-------------

PR: https://git.openjdk.java.net/jdk/pull/1153



More information about the hotspot-gc-dev mailing list