Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 27922b4260f65d317aabda37e42bbbff > files > 2291

kernel-2.6.18-238.el5.src.rpm

From: Larry Woodman <lwoodman@redhat.com>
Date: Thu, 3 Jan 2008 17:16:19 -0500
Subject: [mm] show_mem: include count of pagecache pages
Message-id: 477D5EB3.7040605@redhat.com
O-Subject: [RHEL5 patch] Include count of pagecache pages in show_mem() output.
Bugzilla: 428094

The RHEL5 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
------------------------------------------------

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index d7d44c3..77b02ee 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -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();
 }