ANDROID: GKI: 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.

Bug: 151963988
Test: build
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
(cherry picked from commit f15713432cbe85742b1ffc9db00ace1b2d6acd80)
[surenb: cherry-picked to resolve ABI diffs caused by vm_event_item enum]
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I113cfce495b5b70f0cef88c8425c7252e01291fe
This commit is contained in:
Vinayak Menon
2015-07-13 13:24:55 +05:30
committed by Suren Baghdasaryan
parent b85526df37
commit 34e3bd1772
3 changed files with 6 additions and 3 deletions

View File

@@ -22,7 +22,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),
FOR_ALL_ZONES(ALLOCSTALL),
FOR_ALL_ZONES(PGSCAN_SKIP),

View File

@@ -194,10 +194,12 @@ static void unaccount_page_cache_page(struct address_space *mapping,
* 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);
}
VM_BUG_ON_PAGE(PageTail(page), page);
VM_BUG_ON_PAGE(page_mapped(page), page);

View File

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