RFR: 8319795: Static huge pages are not used for CodeCache
Volker Simonis
simonis at openjdk.org
Thu Nov 9 15:52:57 UTC 2023
On Thu, 9 Nov 2023 15:20:26 GMT, Evgeny Astigeevich <eastigeevich at openjdk.org> wrote:
> This is a fix of a regression introduced by [JDK-8261894](https://bugs.openjdk.org/browse/JDK-8261894).
> After JDK-8261894, `os::can_execute_large_page_memory()` returns `true` only if `UseTransparentHugePages` is true. As CodeCache uses `os::can_execute_large_page_memory()` when it detects a page size, CodeCache cannot use static huge pages.
> Before JDK-8261894, `os::can_execute_large_page_memory()` returned `true` when either `UseTransparentHugePages` or `UseHugeTLBFS` was true.
>
> After JDK-8261894, `XX:+UseLargePages XX:-UseTransparentHugePages` means to use static huge pages: aka `UseHugeTLBFS` is `true`. If `UseLargePages` is not set to `true` via the option, it will be set to `true` if `UseTransparentHugePages` is `true`.
>
> `os::can_execute_large_page_memory()` is modified to return `UseLargePages`. A regression gtest is added.
>
> Tested fastdebug and release builds:
> - [x] tier1
> - [x] gtest
> - [x] test/hotspot/jtreg/gtest/LargePageGtests.java
Good catch! Looks good to me.
-------------
Marked as reviewed by simonis (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/16582#pullrequestreview-1722868970
More information about the hotspot-runtime-dev
mailing list