RFR: 8324776: runtime/os/TestTransparentHugePageUsage.java fails with The usage of THP is not enough
Liming Liu
duke at openjdk.org
Tue Apr 16 09:03:13 UTC 2024
This PR remove the testcase introduced in JDK-8315923, as we could not find a reliable way to evaluate the usage of THP. We have tried the following methods:
1. transverse /proc/self/smaps rather than looking up the first map covered by the heap, as we found there can be multiple sections in /proc/self/smaps for the heap; (https://github.com/limingliu-ampere/jdk/commit/c5b0c4cdf9fa42988faa9fee6ee004ebb599d40a)
2. take the mode of de-fragment and the enabling of khugepaged into account rather than just THP mode, as THP may not be available immediately when the de-fragment mode is neither "always" nor "madvise", or khugepaged does not collapse pages; (https://github.com/limingliu-ampere/jdk/commit/9c70e9384325b44e074a9e8973846343b27fd2cc)
3. call madvise with MADV_HUGEPAGE unconditionally rather than calling it only when THP mode is not "always", and adjust the sizes of young and old generations to ensure the parameters are aligned with THP; (https://github.com/limingliu-ampere/jdk/commit/de9607ff64cc526bca9968b72a7065888c2f944d)
4. check the changes of system-wide counters like thp_* in /proc/vmstat before and after pretouch via gtest. (https://github.com/limingliu-ampere/jdk/commit/bc83e19a682156ee7d09bf939c2b18f3d8c79e22)
But none of them helps. The amount of THP keeps zero on Oracle CI, although the THP mode is "always", the de-fragment mode is "madvise" and khugepaged is enabled. Furthermore, none of thp counters changed around pretouch. However, we tried the same kernel (5.15-UEK) as Oracle CI on our machine, and found that these methods do help. Thus, we decided to remove this testcase.
-------------
Commit messages:
- Remove the testcase
Changes: https://git.openjdk.org/jdk/pull/18792/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18792&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8324776
Stats: 106 lines in 2 files changed: 0 ins; 106 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/18792.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/18792/head:pull/18792
PR: https://git.openjdk.org/jdk/pull/18792
More information about the hotspot-runtime-dev
mailing list