浏览代码

Include count of pagecache pages in show_mem() output

The show_mem() output does not include the total number of pagecache
pages.  This would be helpful when analyzing the debug information in
the /var/log/messages file after OOM kills occur.

This patch includes the total pagecache pages in that output.

Signed-off-by: Larry Woodman <lwoodman@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Larry Woodman 17 年之前
父节点
当前提交
e6f3602d2c
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      mm/page_alloc.c

+ 2 - 0
mm/page_alloc.c

@@ -1874,6 +1874,8 @@ void show_free_areas(void)
 		printk("= %lukB\n", K(total));
 		printk("= %lukB\n", K(total));
 	}
 	}
 
 
+	printk("%ld total pagecache pages\n", global_page_state(NR_FILE_PAGES));
+
 	show_swap_cache_info();
 	show_swap_cache_info();
 }
 }