RFR: 8261401: Add sanity check for UseSHM large pages similar to the one used with hugetlb large pages [v2]
Stefan Johansson
sjohanss at openjdk.java.net
Wed Feb 10 19:33:38 UTC 2021
On Wed, 10 Feb 2021 18:36:28 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> Stefan Johansson has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Thomas review
>>
>> Removed check for IPC_LOCK capability. If a large page mapping fails
>> the errno is already present in the warning printed out. We could
>> look at improving this to better explain when EPERM vs ENOMEM occurs.
>
> src/hotspot/os/linux/os_linux.cpp line 3781:
>
>> 3779: }
>> 3780:
>> 3781: log_warning(pagesize)("UseLargePages disabled, no large pages configured and available on the system.");
>
> IIUC here we end up if UseLargePages=true (by default or not) and we were unable to get any of our APIs to work? Should this be an unconditional printout? At least make it only unconditional if UseLargePages==true is not default? I know its only a theoretical problem now since default is false.
You are correct we only end up here if `UseLargePages` is true. Making it conditional like that would be consistent with the other warnings. So only warn if the user explicitly set `+UseLargePages`. So something like?
Suggestion:
if (!FLAG_IS_DEFAULT(UseLargePages)) {
log_warning(pagesize)("UseLargePages disabled, no large pages configured and available on the system.");
}
-------------
PR: https://git.openjdk.java.net/jdk/pull/2488
More information about the hotspot-dev
mailing list