diff options
author | David Rientjes <rientjes@google.com> | 2011-01-13 18:47:14 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 20:32:46 -0500 |
commit | 05b258e99725112c4febeab4fad23ea2c8908a3a (patch) | |
tree | f373644f42104eef9c78299d52cec4f6975a3ef0 /drivers/base/node.c | |
parent | 9992af102974f3f8a02a1f2729c3461881539e26 (diff) |
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>
Diffstat (limited to 'drivers/base/node.c')
-rw-r--r-- | drivers/base/node.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/drivers/base/node.c b/drivers/base/node.c index ce012a9c6201..36b43052001d 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c | |||
@@ -117,12 +117,21 @@ static ssize_t node_read_meminfo(struct sys_device * dev, | |||
117 | "Node %d WritebackTmp: %8lu kB\n" | 117 | "Node %d WritebackTmp: %8lu kB\n" |
118 | "Node %d Slab: %8lu kB\n" | 118 | "Node %d Slab: %8lu kB\n" |
119 | "Node %d SReclaimable: %8lu kB\n" | 119 | "Node %d SReclaimable: %8lu kB\n" |
120 | "Node %d SUnreclaim: %8lu kB\n", | 120 | "Node %d SUnreclaim: %8lu kB\n" |
121 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
122 | "Node %d AnonHugePages: %8lu kB\n" | ||
123 | #endif | ||
124 | , | ||
121 | nid, K(node_page_state(nid, NR_FILE_DIRTY)), | 125 | nid, K(node_page_state(nid, NR_FILE_DIRTY)), |
122 | nid, K(node_page_state(nid, NR_WRITEBACK)), | 126 | nid, K(node_page_state(nid, NR_WRITEBACK)), |
123 | nid, K(node_page_state(nid, NR_FILE_PAGES)), | 127 | nid, K(node_page_state(nid, NR_FILE_PAGES)), |
124 | nid, K(node_page_state(nid, NR_FILE_MAPPED)), | 128 | nid, K(node_page_state(nid, NR_FILE_MAPPED)), |
125 | nid, K(node_page_state(nid, NR_ANON_PAGES)), | 129 | nid, K(node_page_state(nid, NR_ANON_PAGES) |
130 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
131 | + node_page_state(nid, NR_ANON_TRANSPARENT_HUGEPAGES) * | ||
132 | HPAGE_PMD_NR | ||
133 | #endif | ||
134 | ), | ||
126 | nid, K(node_page_state(nid, NR_SHMEM)), | 135 | nid, K(node_page_state(nid, NR_SHMEM)), |
127 | nid, node_page_state(nid, NR_KERNEL_STACK) * | 136 | nid, node_page_state(nid, NR_KERNEL_STACK) * |
128 | THREAD_SIZE / 1024, | 137 | THREAD_SIZE / 1024, |
@@ -133,7 +142,13 @@ static ssize_t node_read_meminfo(struct sys_device * dev, | |||
133 | nid, K(node_page_state(nid, NR_SLAB_RECLAIMABLE) + | 142 | nid, K(node_page_state(nid, NR_SLAB_RECLAIMABLE) + |
134 | node_page_state(nid, NR_SLAB_UNRECLAIMABLE)), | 143 | node_page_state(nid, NR_SLAB_UNRECLAIMABLE)), |
135 | nid, K(node_page_state(nid, NR_SLAB_RECLAIMABLE)), | 144 | nid, K(node_page_state(nid, NR_SLAB_RECLAIMABLE)), |
136 | nid, K(node_page_state(nid, NR_SLAB_UNRECLAIMABLE))); | 145 | nid, K(node_page_state(nid, NR_SLAB_UNRECLAIMABLE)) |
146 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
147 | , nid, | ||
148 | K(node_page_state(nid, NR_ANON_TRANSPARENT_HUGEPAGES) * | ||
149 | HPAGE_PMD_NR) | ||
150 | #endif | ||
151 | ); | ||
137 | n += hugetlb_report_node_meminfo(nid, buf + n); | 152 | n += hugetlb_report_node_meminfo(nid, buf + n); |
138 | return n; | 153 | return n; |
139 | } | 154 | } |