Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3a2fd6fb authored by Vinayak Menon's avatar Vinayak Menon Committed by Charan Teja Reddy
Browse files

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: default avatarVinayak Menon <vinmenon@codeaurora.org>
Signed-off-by: default avatarCharan Teja Reddy <charante@codeaurora.org>
parent 0d88cce3
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -22,7 +22,7 @@


#define FOR_ALL_ZONES(xx) DMA_ZONE(xx) DMA32_ZONE(xx) xx##_NORMAL, HIGHMEM_ZONE(xx) xx##_MOVABLE
#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(PGALLOC),
		FOR_ALL_ZONES(ALLOCSTALL),
		FOR_ALL_ZONES(ALLOCSTALL),
		FOR_ALL_ZONES(PGSCAN_SKIP),
		FOR_ALL_ZONES(PGSCAN_SKIP),
+4 −2
Original line number Original line Diff line number Diff line
@@ -194,10 +194,12 @@ void __delete_from_page_cache(struct page *page, void *shadow)
	 * invalidate any existing cleancache entries.  We can't leave
	 * invalidate any existing cleancache entries.  We can't leave
	 * stale data around in the cleancache once our page is gone
	 * 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);
		cleancache_put_page(page);
	else
	} else {
		cleancache_invalidate_page(mapping, page);
		cleancache_invalidate_page(mapping, page);
	}


	VM_BUG_ON_PAGE(PageTail(page), page);
	VM_BUG_ON_PAGE(PageTail(page), page);
	VM_BUG_ON_PAGE(page_mapped(page), page);
	VM_BUG_ON_PAGE(page_mapped(page), page);
+1 −0
Original line number Original line Diff line number Diff line
@@ -1099,6 +1099,7 @@ const char * const vmstat_text[] = {
	/* enum vm_event_item counters */
	/* enum vm_event_item counters */
	"pgpgin",
	"pgpgin",
	"pgpgout",
	"pgpgout",
	"pgpgoutclean",
	"pswpin",
	"pswpin",
	"pswpout",
	"pswpout",