RFR: JDK-8304954: SegmentedCodeCache fails when using large pages [v4]

Thomas Stuefe stuefe at openjdk.org
Tue Jul 25 09:27:43 UTC 2023


On Tue, 25 Jul 2023 09:09:56 GMT, Damon Fenacci <dfenacci at openjdk.org> wrote:

>> test/hotspot/jtreg/compiler/codecache/CheckLargePages.java line 61:
>> 
>>> 59:         } else {
>>> 60:             System.out.println("1GB large pages not supported: UseLargePages=" + largePages +
>>> 61:                     (largePages ? ", largePageSize=" + largePageSize : "") + ". Skipping");
>> 
>> It would be nice to have an actual test for the downgrade. Eg if system supports 1g and 2m and 4k, check that we downgrade to 2m.
>
> It would be nice indeed. I was looking at a way to get all page sizes available from inside the test: do you know if that is possible?

The best solution would be something like runtime/os/HugePageConfiguration, which has functions to read hugepage config directly from the OS. Unfortunately, that is package local. It may be valid to just move your test into that directory (arguably, it has to do with both code cache and huge pages, so it could be placed there too) and use it.

Another, simpler, solution would be to scan the huge page configuration information we print at startup. -Xlog:pagesize tells you the page sizes we scan for static huge pages, and then also the page sizes we decide on using (subtly different things). That output you could scan in this test.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14903#discussion_r1273256215


More information about the hotspot-compiler-dev mailing list