thp: transparent hugepage sysfs meminfo
Add hugepage statistics to per-node sysfs meminfo Reviewed-by: Rik van Riel <riel@redhat.com> Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Andrea Arcangeli <aarcange@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:
committed by
Linus Torvalds
parent
9992af1029
commit
05b258e997
@@ -117,12 +117,21 @@ static ssize_t node_read_meminfo(struct sys_device * dev,
|
|||||||
"Node %d WritebackTmp: %8lu kB\n"
|
"Node %d WritebackTmp: %8lu kB\n"
|
||||||
"Node %d Slab: %8lu kB\n"
|
"Node %d Slab: %8lu kB\n"
|
||||||
"Node %d SReclaimable: %8lu kB\n"
|
"Node %d SReclaimable: %8lu kB\n"
|
||||||
"Node %d SUnreclaim: %8lu kB\n",
|
"Node %d SUnreclaim: %8lu kB\n"
|
||||||
|
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||||
|
"Node %d AnonHugePages: %8lu kB\n"
|
||||||
|
#endif
|
||||||
|
,
|
||||||
nid, K(node_page_state(nid, NR_FILE_DIRTY)),
|
nid, K(node_page_state(nid, NR_FILE_DIRTY)),
|
||||||
nid, K(node_page_state(nid, NR_WRITEBACK)),
|
nid, K(node_page_state(nid, NR_WRITEBACK)),
|
||||||
nid, K(node_page_state(nid, NR_FILE_PAGES)),
|
nid, K(node_page_state(nid, NR_FILE_PAGES)),
|
||||||
nid, K(node_page_state(nid, NR_FILE_MAPPED)),
|
nid, K(node_page_state(nid, NR_FILE_MAPPED)),
|
||||||
nid, K(node_page_state(nid, NR_ANON_PAGES)),
|
nid, K(node_page_state(nid, NR_ANON_PAGES)
|
||||||
|
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||||
|
+ node_page_state(nid, NR_ANON_TRANSPARENT_HUGEPAGES) *
|
||||||
|
HPAGE_PMD_NR
|
||||||
|
#endif
|
||||||
|
),
|
||||||
nid, K(node_page_state(nid, NR_SHMEM)),
|
nid, K(node_page_state(nid, NR_SHMEM)),
|
||||||
nid, node_page_state(nid, NR_KERNEL_STACK) *
|
nid, node_page_state(nid, NR_KERNEL_STACK) *
|
||||||
THREAD_SIZE / 1024,
|
THREAD_SIZE / 1024,
|
||||||
@@ -133,7 +142,13 @@ static ssize_t node_read_meminfo(struct sys_device * dev,
|
|||||||
nid, K(node_page_state(nid, NR_SLAB_RECLAIMABLE) +
|
nid, K(node_page_state(nid, NR_SLAB_RECLAIMABLE) +
|
||||||
node_page_state(nid, NR_SLAB_UNRECLAIMABLE)),
|
node_page_state(nid, NR_SLAB_UNRECLAIMABLE)),
|
||||||
nid, K(node_page_state(nid, NR_SLAB_RECLAIMABLE)),
|
nid, K(node_page_state(nid, NR_SLAB_RECLAIMABLE)),
|
||||||
nid, K(node_page_state(nid, NR_SLAB_UNRECLAIMABLE)));
|
nid, K(node_page_state(nid, NR_SLAB_UNRECLAIMABLE))
|
||||||
|
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||||
|
, nid,
|
||||||
|
K(node_page_state(nid, NR_ANON_TRANSPARENT_HUGEPAGES) *
|
||||||
|
HPAGE_PMD_NR)
|
||||||
|
#endif
|
||||||
|
);
|
||||||
n += hugetlb_report_node_meminfo(nid, buf + n);
|
n += hugetlb_report_node_meminfo(nid, buf + n);
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user