Re: [PATCH v3 3/4] mm: add system wide stats items category

Pasha Tatashin
2024-08-08T19:02:27Z

On Thu, Aug 8, 2024 at 2:20 PM David Hildenbrand <david@redhat.com> wrote:
>
> On 08.08.24 17:42, Pasha Tatashin wrote:
> > /proc/vmstat contains events and stats, events can only grow, but stats
> > can grow and srhink.
>
> s/shrink/

Thanks, fixed.

>
> I think we discussed exposing this in /proc/meminfo. There, it would be
> much easier to simply have a global variable, print it, and be done with
> it. Like we do with TotalCma.

Originally, Sourav had proposed adding per-page metadata stat to
/proc/meminfo, but it was decided against, because all the other stats
in /proc/meminfo are part of MemTotal, but memmap allocations are not
always part of MemTotal which makes things confusing.

This is why it makes sense to keep nr_memmap only in /proc/vmstat.