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
Mon Nov 4 07:36:35 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.

Thank you for your reviews @eastig @TobiHartmann.

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

PR Comment: https://git.openjdk.org/jdk/pull/21757#issuecomment-2453985227


More information about the hotspot-compiler-dev mailing list