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>
This commit is contained in:

committed by
Linus Torvalds

parent
71de1ccbe1
commit
c6a7f5728a
@@ -84,6 +84,7 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
|
||||
"Slab: %8lu kB\n"
|
||||
"SReclaimable: %8lu kB\n"
|
||||
"SUnreclaim: %8lu kB\n"
|
||||
"KernelStack: %8lu kB\n"
|
||||
"PageTables: %8lu kB\n"
|
||||
#ifdef CONFIG_QUICKLIST
|
||||
"Quicklists: %8lu kB\n"
|
||||
@@ -128,6 +129,7 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
|
||||
global_page_state(NR_SLAB_UNRECLAIMABLE)),
|
||||
K(global_page_state(NR_SLAB_RECLAIMABLE)),
|
||||
K(global_page_state(NR_SLAB_UNRECLAIMABLE)),
|
||||
global_page_state(NR_KERNEL_STACK) * THREAD_SIZE / 1024,
|
||||
K(global_page_state(NR_PAGETABLE)),
|
||||
#ifdef CONFIG_QUICKLIST
|
||||
K(quicklist_total_size()),
|
||||
|
Reference in New Issue
Block a user