Regarding new stats, maybe an interface that indicates the actual sizes would be
best. As discussed, extending the existing single-large-file statistics might
not be possible and we'd have to come up with a new interface, that maybe
completely lacks "AnonHugePages" and directly goes for the individual sizes.
Yes, but I think we are agreed this is future work.
We do want to have at least some way to verify that mTHP is active from
day 0, though.
Could you clarify what you mean by "active"?
Current plan is that there will be a per-size
transparent_hugepage/hugepages-<size>kB/enabled sysfs file that can be querried
to see if the size is enabled (available for the kernel to use).
But for this initial submission, we previously agreed (well, at least David and
I) that not having a full set of stats is not a problem - they can come later.
So the only way to verify that the kernel is allocating and mapping a particular
THP size is to parse /proc/<pid>pagemap and look at the PFNs for now. Is that
sufficient?