Skip to contentSkip to conversation

Include count of pagecache pages in show_mem() output.

PATCH New Larry Woodman 1 participant 1 message Jan 7, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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:

mm/page_alloc.c renamed from mm/page_alloc.c.orig +2 -0
@@ -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();
 }