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

Evgeny Astigeevich eastigeevich at openjdk.org
Thu Dec 7 15:36:03 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 with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 17 additional commits since the last revision:

 - Remove compiler/codecache/CheckLargePages.java from problem list
 - Add new tests
 - Merge branch 'master' into JDK-8319795
 - Fix support of explicit huge pages
 - Revert "Refactor CodeCache init code for better support of different memory page sizes"
   
   This reverts commit 5416895d565923b7689b3059af68bd9011c61705.
 - Revert "Add missing include"
   
   This reverts commit c35739fccf05c12969083d5c14c3750b5920fc21.
 - Revert "Align ReservedCodeCacheSize to max(preferred page size, os::vm_allocation_granularity())"
   
   This reverts commit f495310ef48791d851ef37eb3fb1d559dabf329e.
 - Revert "Fix code heap sizes to be multiple of rs.alignment()"
   
   This reverts commit 41cc20b2e488647468de009d13085ea7882d5437.
 - Revert "Fix code heap initial sizes to be multiple of rs.alignment()"
   
   This reverts commit 17c42cddd220a0f47f8b944271d9b96b32e51b59.
 - Fix code heap initial sizes to be multiple of rs.alignment()
 - ... and 7 more: https://git.openjdk.org/jdk/compare/e920a3c2...f6d181d8

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/16582/files
  - new: https://git.openjdk.org/jdk/pull/16582/files/34e6ed0f..f6d181d8

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

  Stats: 88904 lines in 1847 files changed: 42180 ins; 39478 del; 7246 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