RFR: 8267155: runtime/os/TestTracePageSizes times out [v4]
Stefan Johansson
sjohanss at openjdk.java.net
Tue May 18 12:26:43 UTC 2021
On Tue, 18 May 2021 12:15:49 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> The more I think about this the more confused I get.
>
I recognize that feeling
> In theory, THP can be enabled on a machine in a way which needs no cooperation of the VM; so whether or not we run with +UseTransparentHugePages makes no difference, pages used by the VM may be folded transparently to huge pages without our knowledge. Would on those machines the section show up as "VmFlags: hg" too? Or is this only the explicit madvice flag? Would the KernelPageSize reflect the page size set by the THP folding process (probably not since it can be multiple page sizes)?
>
>From what I've seen KernelPageSize is only different for the HugeTLBFS pages. Reading the doc it says this about the `hg`flag:
`hg - huge page advise flag`
So I also think it would only show when running with `+UseTransparentHugePages`.
> And would this "proactive folding" interfere with the recognition of hugetlb pages? In other words, could we trace out "4k" and then have a "2048k" region show up in smaps?
>
> The more I think about this, the muddier it gets. ATM I think we should just skip this test altogether for older kernels, and/or not test THP at all... not sure what to think here.
>
I'm totally fine with skipping older kernel. I think the fact that we test this on newer kernels and it passes at least shows that we trace the correct thing.
> I also found this piece in man proc:
>
> ```
> The "KernelPageSize" line (available since Linux 2.6.29)
> is the page size used by the kernel to back the virtual
> memory area. .....
> However, one counter-example occurs on PPC64 kernels
> whereby a kernel using 64 kB as a base page
> size may still use 4 kB pages for the MMU on older
> processors.
> ```
>
> I propose to just skip the test on that platform. Personally I have never used large pages on a ppc machine.
Fine with me :)
-------------
PR: https://git.openjdk.java.net/jdk/pull/4064
More information about the hotspot-runtime-dev
mailing list