From: Larry Woodman Date: Tue, 5 Feb 2008 06:29:30 +0000 (-0800) Subject: Include count of pagecache pages in show_mem() output X-Git-Tag: v2.6.25-rc1~927 X-Git-Url: http://bbs.cooldavid.org/git/?a=commitdiff_plain;h=e6f3602d2c58815775b2a293cec6650622236169;p=net-next-2.6.git 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/page_alloc.c b/mm/page_alloc.c index d73c133fdbe..37576b822f0 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1874,6 +1874,8 @@ void show_free_areas(void) printk("= %lukB\n", K(total)); } + printk("%ld total pagecache pages\n", global_page_state(NR_FILE_PAGES)); + show_swap_cache_info(); }