Re: [PATCH v1] mm: Add /proc/$PID/pageflags
From: Matthew Wilcox
Date: Sat Oct 30 2021 - 22:37:58 EST
On Sat, Oct 30, 2021 at 03:06:31PM -0700, Mina Almasry wrote:
> Not quite sufficient, no. The process may have lots of non performance
> critical memory. The network service cares about specific memory
> ranges and wants to know if those are backed by hugepages.
Would it make sense to extend mincore() instead? We have 7 remaining
bits per byte.
But my question is, what information do you really want? Do you want
to know if the memory range is backed by huge pages, or do you want to
know if PMDs are being used to map the backing memory?
What information would you want to see if, say, 64kB entries are being
used on a 4kB ARM system where there's hardware support for those.
Other architectures also have support for TLB entries that are
intermediate between PTE and PMD sizes.