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

Marcus G K Williams github.com+168222+mgkwill at openjdk.java.net
Fri Apr 23 22:39:27 UTC 2021


On Wed, 21 Apr 2021 18:00:52 GMT, Marcus G K Williams <github.com+168222+mgkwill at openjdk.org> wrote:

> an easy approach should be to just remove all large page sizes larger than the decided maximum from _page_sizes.

It seemed easier to forgo adding large page sizes if they were less than `LargePageSizeInBytes` and `LargePageSizeInBytes != 0` or default. Please let me know if the solution seems appropriate. 

> The warning should go away since it is documented to mean use the default.
Done. Feedback there would also be helpful.

I'm seeing one failure with the TestTracePageSizes test that I'm yet to figure out. On a run with `run main/othervm -XX:+AlwaysPreTouch -Xlog:pagesize:ps-%p.log -XX:+UseSerialGC -XX:+UseTransparentHugePages TestTracePageSizes` 


==============================
Test summary
==============================
   TEST                                              TOTAL  PASS  FAIL ERROR
   jtreg:test/hotspot/jtreg/runtime/os/TestTracePageSizes.java
>>                                                       6     5     1     0 <<
==============================
TEST FAILURE

...

---
>From logfile: [0.004s][info][pagesize] Heap:  min=8M max=15452M base=0x000000043a400000 page_size=2M size=15452M                                                            From smaps: [43a400000, 440000000) pageSize=4KB isTHP=false isHUGETLB=false                                                                                                 Failure: 4 != 2048
STDERR:
java.lang.AssertionError: Page sizes mismatch: 4 != 2048
        at TestTracePageSizes.main(TestTracePageSizes.java:202)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
        at java.base/java.lang.Thread.run(Thread.java:831)

JavaTest Message: Test threw exception: java.lang.AssertionError: Page sizes mismatch: 4 != 2048
JavaTest Message: shutting down test

...

reason: User specified action: run main/othervm -XX:+AlwaysPreTouch -Xlog:pagesize:ps-%p.log -XX:+UseSerialGC -XX:+UseTransparentHugePages TestTracePageSizes
Mode: othervm [/othervm specified]
elapsed time (seconds): 0.803
configuration:
STDOUT:
Added range: [43a400000, 440000000) pageSize=4KB isTHP=false isHUGETLB=false
Added range: [440000000, 480000000) pageSize=4KB isTHP=true isHUGETLB=false
Added range: [480000000, 57c2a0000) pageSize=4KB isTHP=false isHUGETLB=false

Two guesses so far: It seems like a possible issue with `ReservedSpace::actual_reserved_page_size` returning the wrong page size. Or could this base page address be 4k padding for THP largepage?

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

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



More information about the hotspot-gc-dev mailing list