mm: vmstat: add pageoutclean

vmstat events currently count pgpgout, but that includes
only the writebacks, and not the reclaim of clean
pages. Add an event to count clean page evictions. This is
helpful to evaluate page thrashing cases.

Change-Id: Icfb797877a544a58c289074bdc290dfbc1384514
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
This commit is contained in:
Vinayak Menon 2015-07-13 13:24:55 +05:30 committed by David Keitel
parent 1c5466dbec
commit e74a8a432e
3 changed files with 6 additions and 3 deletions

View file

@ -21,7 +21,7 @@
#define FOR_ALL_ZONES(xx) DMA_ZONE(xx) DMA32_ZONE(xx) xx##_NORMAL, HIGHMEM_ZONE(xx) xx##_MOVABLE
enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
enum vm_event_item { PGPGIN, PGPGOUT, PGPGOUTCLEAN, PSWPIN, PSWPOUT,
FOR_ALL_ZONES(PGALLOC),
PGFREE, PGACTIVATE, PGDEACTIVATE,
PGFAULT, PGMAJFAULT,

View file

@ -189,10 +189,12 @@ void __delete_from_page_cache(struct page *page, void *shadow,
* invalidate any existing cleancache entries. We can't leave
* stale data around in the cleancache once our page is gone
*/
if (PageUptodate(page) && PageMappedToDisk(page))
if (PageUptodate(page) && PageMappedToDisk(page)) {
count_vm_event(PGPGOUTCLEAN);
cleancache_put_page(page);
else
} else {
cleancache_invalidate_page(mapping, page);
}
page_cache_tree_delete(mapping, page, shadow);

View file

@ -772,6 +772,7 @@ const char * const vmstat_text[] = {
/* enum vm_event_item counters */
"pgpgin",
"pgpgout",
"pgpgoutclean",
"pswpin",
"pswpout",