aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>2009-09-21 20:01:32 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-22 10:17:27 -0400
commitc6a7f5728a1db45d30df55a01adc130b4ab0327c (patch)
tree36649bc6ebb959841a5097c699968722cfd99c4d /fs
parent71de1ccbe1fb40203edd3beb473f8580d917d2ca (diff)
mm: oom analysis: Show kernel stack usage in /proc/meminfo and OOM log output
The amount of memory allocated to kernel stacks can become significant and cause OOM conditions. However, we do not display the amount of memory consumed by stacks. Add code to display the amount of memory used for stacks in /proc/meminfo. Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Reviewed-by: Christoph Lameter <cl@linux-foundation.org> Reviewed-by: Minchan Kim <minchan.kim@gmail.com> Reviewed-by: Rik van Riel <riel@redhat.com> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/proc/meminfo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/proc/meminfo.c b/fs/proc/meminfo.c
index d5c410d47fae..1fc588f430e4 100644
--- a/fs/proc/meminfo.c
+++ b/fs/proc/meminfo.c
@@ -84,6 +84,7 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
84 "Slab: %8lu kB\n" 84 "Slab: %8lu kB\n"
85 "SReclaimable: %8lu kB\n" 85 "SReclaimable: %8lu kB\n"
86 "SUnreclaim: %8lu kB\n" 86 "SUnreclaim: %8lu kB\n"
87 "KernelStack: %8lu kB\n"
87 "PageTables: %8lu kB\n" 88 "PageTables: %8lu kB\n"
88#ifdef CONFIG_QUICKLIST 89#ifdef CONFIG_QUICKLIST
89 "Quicklists: %8lu kB\n" 90 "Quicklists: %8lu kB\n"
@@ -128,6 +129,7 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
128 global_page_state(NR_SLAB_UNRECLAIMABLE)), 129 global_page_state(NR_SLAB_UNRECLAIMABLE)),
129 K(global_page_state(NR_SLAB_RECLAIMABLE)), 130 K(global_page_state(NR_SLAB_RECLAIMABLE)),
130 K(global_page_state(NR_SLAB_UNRECLAIMABLE)), 131 K(global_page_state(NR_SLAB_UNRECLAIMABLE)),
132 global_page_state(NR_KERNEL_STACK) * THREAD_SIZE / 1024,
131 K(global_page_state(NR_PAGETABLE)), 133 K(global_page_state(NR_PAGETABLE)),
132#ifdef CONFIG_QUICKLIST 134#ifdef CONFIG_QUICKLIST
133 K(quicklist_total_size()), 135 K(quicklist_total_size()),