RFR: 8263236: runtime/os/TestTracePageSizes.java fails on old kernels [v2]
Thomas Stuefe
stuefe at openjdk.java.net
Wed Apr 21 12:28:37 UTC 2021
On Sat, 10 Apr 2021 05:59:43 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> See the bug report for details. On some kernels, the madvise hint is not reflected in `/proc/smaps`. Instead, we can use a secondary evidence and read `AnonHugePages`.
>>
>> Additional testing:
>> - [x] Test with kernel 5.4.0 (still passes)
>> - [x] Test with kernel 4.9.0 (used to fail, now passes)
>
> Aleksey Shipilev 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 three additional commits since the last revision:
>
> - Merge branch 'master' into JDK-8263236-trace-page-sizes
> - Make jcheck happy: remove the TAB
> - 8263236: runtime/os/TestTracePageSizes.java fails on old kernels
I try to understand this. So:
AnonHugePages - number of huge pages mapped into area, THP or explicit
ht - this area is mapped with explicit huge pages
hg - this area is mapped with madvise(huge_pages), which indicates THP
Therefore: !ht && AnonHugePages > 0 -> THP?
What confuses me is that the kernel patch you refer to: https://github.com/torvalds/linux/commit/50f8b92f21d23789bd4ada593e8ddc56cc4f79fe sounds like the flag is not passed down to the memory management layer. Would this not effectively switch off THP for the region, and the resulting mapping would use small pages? In which case the failing test would have been correct, since we specified UseTransparentHugePages but it did not work?
Sorry for my confusion.
..Thomas
-------------
PR: https://git.openjdk.java.net/jdk/pull/3415
More information about the hotspot-runtime-dev
mailing list