mm: memcontrol: add file_thp, shmem_thp to memory.stat
As huge page usage in the page cache and for shmem files proliferates in our production environment, the performance monitoring team has asked for per-cgroup stats on those pages. We already track and export anon_thp per cgroup. We already track file THP and shmem THP per node, so making them per-cgroup is only a matter of switching from node to lruvec counters. All callsites are in places where the pages are charged and locked, so page->memcg is stable. [hannes@cmpxchg.org: add documentation] Link: https://lkml.kernel.org/r/20201026174029.GC548555@cmpxchg.org Link: https://lkml.kernel.org/r/20201022151844.489337-1-hannes@cmpxchg.org Signed-off-by:Johannes Weiner <hannes@cmpxchg.org> Reviewed-by:
Rik van Riel <riel@surriel.com> Reviewed-by:
Shakeel Butt <shakeelb@google.com> Acked-by:
David Rientjes <rientjes@google.com> Acked-by:
Michal Hocko <mhocko@suse.com> Acked-by:
Song Liu <songliubraving@fb.com> Signed-off-by:
Andrew Morton <akpm@linux...>
Showing
- Documentation/admin-guide/cgroup-v2.rst 8 additions, 0 deletionsDocumentation/admin-guide/cgroup-v2.rst
- mm/filemap.c 2 additions, 2 deletionsmm/filemap.c
- mm/huge_memory.c 2 additions, 2 deletionsmm/huge_memory.c
- mm/khugepaged.c 2 additions, 2 deletionsmm/khugepaged.c
- mm/memcontrol.c 5 additions, 1 deletionmm/memcontrol.c
- mm/shmem.c 1 addition, 1 deletionmm/shmem.c
Please register or sign in to comment