diff options
author | KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> | 2008-09-02 17:35:53 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-09-02 22:21:38 -0400 |
commit | 4b8561521dbaa3d766b198496b220e984e3bf756 (patch) | |
tree | af96d2bd09d7a1e0349b4dbfc879e009a8ca13eb /fs/proc | |
parent | 36fd71d293898a59b14e49da1f6e81c1a58f2035 (diff) |
mm: show quicklist usage in /proc/meminfo
Quicklists can consume several GB of memory. We should provide a means of
monitoring this.
After this patch is applied, /proc/meminfo will output the following:
% cat /proc/meminfo
MemTotal: 7715392 kB
MemFree: 5401600 kB
Buffers: 80384 kB
Cached: 300800 kB
SwapCached: 0 kB
Active: 235584 kB
Inactive: 262656 kB
SwapTotal: 2031488 kB
SwapFree: 2031488 kB
Dirty: 3520 kB
Writeback: 0 kB
AnonPages: 117696 kB
Mapped: 38528 kB
Slab: 1589952 kB
SReclaimable: 23104 kB
SUnreclaim: 1566848 kB
PageTables: 14656 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 5889152 kB
Committed_AS: 393152 kB
VmallocTotal: 17592177655808 kB
VmallocUsed: 29056 kB
VmallocChunk: 17592177626432 kB
Quicklists: 130944 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 262144 kB
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Keiichiro Tokunaga <tokunaga.keiich@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/proc')
-rw-r--r-- | fs/proc/proc_misc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c index ded969862960..00f10a2dcf12 100644 --- a/fs/proc/proc_misc.c +++ b/fs/proc/proc_misc.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/tty.h> | 24 | #include <linux/tty.h> |
25 | #include <linux/string.h> | 25 | #include <linux/string.h> |
26 | #include <linux/mman.h> | 26 | #include <linux/mman.h> |
27 | #include <linux/quicklist.h> | ||
27 | #include <linux/proc_fs.h> | 28 | #include <linux/proc_fs.h> |
28 | #include <linux/ioport.h> | 29 | #include <linux/ioport.h> |
29 | #include <linux/mm.h> | 30 | #include <linux/mm.h> |
@@ -189,7 +190,8 @@ static int meminfo_read_proc(char *page, char **start, off_t off, | |||
189 | "Committed_AS: %8lu kB\n" | 190 | "Committed_AS: %8lu kB\n" |
190 | "VmallocTotal: %8lu kB\n" | 191 | "VmallocTotal: %8lu kB\n" |
191 | "VmallocUsed: %8lu kB\n" | 192 | "VmallocUsed: %8lu kB\n" |
192 | "VmallocChunk: %8lu kB\n", | 193 | "VmallocChunk: %8lu kB\n" |
194 | "Quicklists: %8lu kB\n", | ||
193 | K(i.totalram), | 195 | K(i.totalram), |
194 | K(i.freeram), | 196 | K(i.freeram), |
195 | K(i.bufferram), | 197 | K(i.bufferram), |
@@ -221,7 +223,8 @@ static int meminfo_read_proc(char *page, char **start, off_t off, | |||
221 | K(committed), | 223 | K(committed), |
222 | (unsigned long)VMALLOC_TOTAL >> 10, | 224 | (unsigned long)VMALLOC_TOTAL >> 10, |
223 | vmi.used >> 10, | 225 | vmi.used >> 10, |
224 | vmi.largest_chunk >> 10 | 226 | vmi.largest_chunk >> 10, |
227 | K(quicklist_total_size()) | ||
225 | ); | 228 | ); |
226 | 229 | ||
227 | len += hugetlb_report_meminfo(page + len); | 230 | len += hugetlb_report_meminfo(page + len); |