mm,thp: stats for file backed THP
In preparation for non-shmem THP, this patch adds a few stats and exposes them in /proc/meminfo, /sys/bus/node/devices/<node>/meminfo, and /proc/<pid>/task/<tid>/smaps. This patch is mostly a rewrite of Kirill A. Shutemov's earlier version: https://lkml.kernel.org/r/20170126115819.58875-5-kirill.shutemov@linux.intel.com/ Link: http://lkml.kernel.org/r/20190801184244.3169074-5-songliubraving@fb.com Signed-off-by: Song Liu <songliubraving@fb.com> Acked-by: Rik van Riel <riel@surriel.com> Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Cc: Hillf Danton <hdanton@sina.com> Cc: Hugh Dickins <hughd@google.com> Cc: William Kucharski <william.kucharski@oracle.com> Cc: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
@@ -132,6 +132,10 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
|
||||
global_node_page_state(NR_SHMEM_THPS) * HPAGE_PMD_NR);
|
||||
show_val_kb(m, "ShmemPmdMapped: ",
|
||||
global_node_page_state(NR_SHMEM_PMDMAPPED) * HPAGE_PMD_NR);
|
||||
show_val_kb(m, "FileHugePages: ",
|
||||
global_node_page_state(NR_FILE_THPS) * HPAGE_PMD_NR);
|
||||
show_val_kb(m, "FilePmdMapped: ",
|
||||
global_node_page_state(NR_FILE_PMDMAPPED) * HPAGE_PMD_NR);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CMA
|
||||
|
Reference in New Issue
Block a user