RFR: 8343153: compiler/codecache/CheckLargePages.java fails on linux with huge pages configured but its number set to 0
Damon Fenacci
dfenacci at openjdk.org
Fri Nov 1 13:08:29 UTC 2024
On Thu, 31 Oct 2024 13:16:08 GMT, Evgeny Astigeevich <eastigeevich at openjdk.org> wrote:
>>> The problem might be attributed to the VM only checking for 1GB huge pages to be supported, not how many there currently are.
>>
>> https://bugs.openjdk.org/browse/JDK-8321526
>
>> @eastig I noticed that you are the author of the original `testNonSegmented1GbCodeCacheWith1GbLargePages` test. Could I ask you to have a look at this change? Thanks a lot!
>
> `testDefaultCodeCacheWith1GbLargePages` and `testNonSegmented1GbCodeCacheWith1GbLargePages` should only be run if a system provides 1Gb pages. This is mentioned in their names: `...With1GbLargePages`. If there are no 1Gb pages available, the test should not be run.
>
> I suggest to check `/sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages >= 1`. If not, output "Skipping testDefaultCodeCacheWith1GbLargePages and testDefaultCodeCacheWith1GbLargePages, no 1Gb pages available" .
>
> With your change, if a system provides 1Gb pages but JVM fails to use them because of a bug, the tests will pass and the bug will be unknown.
Thanks for looking into it @eastig.
I've changed the test to check for the content of `/sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages >= 1` as you suggested.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/21757#issuecomment-2451841004
More information about the hotspot-compiler-dev
mailing list