linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Include count of pagecache pages in show_mem() output.
@ 2008-01-04 12:43 Larry Woodman
  0 siblings, 0 replies; only message in thread
From: Larry Woodman @ 2008-01-04 12:43 UTC (permalink / raw)
  To: linux-mm

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

The show_mem() output does not include the total number of
pagecache pages.  This really limits the value of the debugging
information sent to the console and /var/log/messages file when OOM
kills occur. 
The attached patch includes the total pagecache pages in that output:

-------------------------------------------------
   Node 0 Normal: empty
   Node 0 HighMem: empty
> >>113032 pagecache pages
   Swap cache: add 0, delete 0, find 0/0, race 0+0
   Free swap  = 2031608kB
   Total swap = 2031608kB
   Free swap:       2031608kB
   523900 pages of RAM
   42142 reserved pages
   63864 pages shared
   0 pages swap cached
------------------------------------------------


[-- Attachment #2: showmem.patch --]
[-- Type: text/x-patch, Size: 347 bytes --]

--- linux-2.6.18.noarch/mm/page_alloc.c.orig	2008-01-03 15:12:27.000000000 -0500
+++ linux-2.6.18.noarch/mm/page_alloc.c	2008-01-03 15:12:29.000000000 -0500
@@ -1359,6 +1359,8 @@ void show_free_areas(void)
 		printk("= %lukB\n", K(total));
 	}
 
+	printk("%d 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-04 12:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-04 12:43 [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