mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [Patch] Include count of pagecache pages in show_mem() output.
@ 2008-01-07 19:12 Larry Woodman
  0 siblings, 0 replies; only message in thread
From: Larry Woodman @ 2008-01-07 19:12 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 306 bytes --]

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>



[-- Attachment #2: linux-2.6.23-showmem.patch --]
[-- Type: text/plain, Size: 340 bytes --]

--- linux-2.6.23/mm/page_alloc.c.orig	2008-01-07 13:26:00.228823000 -0500
+++ linux-2.6.23/mm/page_alloc.c	2008-01-07 13:33:18.105448000 -0500
@@ -1644,6 +1644,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();
 }
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-01-07 19:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-07 19:12 [Patch] Include count of pagecache pages in show_mem() output Larry Woodman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome