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

Marcus G K Williams mgkwill at openjdk.java.net
Mon May 17 21:11:48 UTC 2021


On Mon, 17 May 2021 21:04:37 GMT, Marcus G K Williams <mgkwill at openjdk.org> wrote:

>> Change the meaning of LargePageSizeInBytes to be the maximum large page size the JVM may use (not the only one). A default value of zero will mean to allow the JVM use large page sizes up to the system's default large page size.
>
> Marcus G K Williams has updated the pull request incrementally with one additional commit since the last revision:
> 
>   kstefanj review comments
>   
>   Signed-off-by: Marcus G K Williams <marcus.williams at intel.com>

src/hotspot/os/linux/os_linux.cpp line 3609:

> 3607:     PPC_ONLY(4 * M)
> 3608:     S390_ONLY(1 * M);
> 3609: #endif // ZERO

> Hi,
> 
> we see crashes on linux ppc64 with gc/g1/TestLargePageUseForAuxMemory.java.
> 
> ```
> #
> #  Internal Error (/sapmnt/sapjvm_work/openjdk/nb/linuxppc64/jdk-dev/src/hotspot/share/utilities/globalDefinitions.cpp:370), pid=44816, tid=44821
> #  assert(div != 0) failed: lcm requires positive arguments
> #
> ```
> 
> Stack:
> 
> ```
> V  [libjvm.so+0xd22efc]  lcm(unsigned long, unsigned long)+0xdc
> V  [libjvm.so+0xcc9430]  GCArguments::compute_heap_alignment()+0x70
> V  [libjvm.so+0x490d1c]  Arguments::apply_ergo()+0x7c
> V  [libjvm.so+0x186a66c]  Threads::create_vm(JavaVMInitArgs*, bool*)+0x1ec
> ```
> 
> Note that ppc64 has 64k pages. I don't have time to investigate this right now, but maybe you can reproduce the crash by faking a 64k page size in os::vm_page_size()?

@tstuefe I tried last week to reproduce the crash by faking a 64k page size in os::vm_page_size(), however I run into an error during VM initialization:


Compiling 4 files for BUILD_JIGSAW_TOOLS
Optimizing the exploded image
Error occurred during initialization of VM
Could not reserve enough space in CodeHeap 'profiled nmethods' (2496K)
gmake[3]: *** [ExplodedImageOptimize.gmk:41: /home/mgkwill/src/git/jdk/build/linux-x86_64-server-release/jdk/_optimize_image_exec.marker] Error 1
gmake[2]: *** [make/Main.gmk:440: exploded-image-optimize] Error 2
gmake[2]: *** Waiting for unfinished jobs....

ERROR: Build failed for targets 'clean test' in configuration 'linux-x86_64-server-release' (exit code 2)

=== Output from failing command(s) repeated here ===
* For target jdk__optimize_image_exec:
Error occurred during initialization of VM
Could not reserve enough space in CodeHeap 'profiled nmethods' (2496K)


I've tried to work around it, but at this point I'm not able to reproduce. Any thoughts on my theory of the cause in the above reply?

If it's not too much trouble we could test the theory by adding back the following @ line 3617 of os_linux.cpp and run linuxppc64 test again.

#ifndef ZERO
  default_large_page_size =
    AARCH64_ONLY(2 * M)
    AMD64_ONLY(2 * M)
    ARM32_ONLY(2 * M)
    IA32_ONLY(4 * M)
    IA64_ONLY(256 * M)
    PPC_ONLY(4 * M)
    S390_ONLY(1 * M);
#endif // ZERO

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

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



More information about the hotspot-gc-dev mailing list