RFR: 8319795: Static huge pages are not used for CodeCache [v8]
Tobias Hartmann
thartmann at openjdk.org
Fri Dec 8 13:05:20 UTC 2023
On Thu, 7 Dec 2023 15:36:03 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 (`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/3c958ede...f6d181d8
Looks reasonable to me but I'm not an expert in this code (anymore). @tstuefe should have a look as well.
-------------
Marked as reviewed by thartmann (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/16582#pullrequestreview-1772290260
More information about the hotspot-runtime-dev
mailing list