RFR: 8319795: Static huge pages are not used for CodeCache [v6]

Evgeny Astigeevich eastigeevich at openjdk.org
Tue Nov 28 23:24:19 UTC 2023


> 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 (`UseTransparentHugePages` is `false`) anymore after the change.
> 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

Evgeny Astigeevich has updated the pull request incrementally with one additional commit since the last revision:

  Fix code heap initial sizes to be multiple of rs.alignment()

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/16582/files
  - new: https://git.openjdk.org/jdk/pull/16582/files/41cc20b2..17c42cdd

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=16582&range=05
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16582&range=04-05

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/16582.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/16582/head:pull/16582

PR: https://git.openjdk.org/jdk/pull/16582


More information about the hotspot-runtime-dev mailing list