This patch add pgvolatile vmstat so admin can see how many of volatile pages are discarded by VM until now. It could be a good indicator of patch effect during test but still not sure we need it in real practice. Will rethink it.
Cc: Michael Kerrisk <[email protected]> Cc: Arun Sharma <[email protected]> Cc: [email protected] Cc: Paul Turner <[email protected]> CC: David Rientjes <[email protected]> Cc: John Stultz <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Christoph Lameter <[email protected]> Cc: Android Kernel Team <[email protected]> Cc: Robert Love <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Rik van Riel <[email protected]> Cc: Dave Chinner <[email protected]> Cc: Neil Brown <[email protected]> Cc: Mike Hommey <[email protected]> Cc: Taras Glek <[email protected]> Cc: KOSAKI Motohiro <[email protected]> Cc: Christoph Lameter <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Signed-off-by: Minchan Kim <[email protected]> --- include/linux/vm_event_item.h | 2 +- mm/vmscan.c | 1 + mm/vmstat.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/linux/vm_event_item.h b/include/linux/vm_event_item.h index 3d31145..f83c3d2 100644 --- a/include/linux/vm_event_item.h +++ b/include/linux/vm_event_item.h @@ -23,7 +23,7 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, FOR_ALL_ZONES(PGALLOC), - PGFREE, PGACTIVATE, PGDEACTIVATE, + PGFREE, PGVOLATILE, PGACTIVATE, PGDEACTIVATE, PGFAULT, PGMAJFAULT, FOR_ALL_ZONES(PGREFILL), FOR_ALL_ZONES(PGSTEAL_KSWAPD), diff --git a/mm/vmscan.c b/mm/vmscan.c index cfe95d3..1ec7345 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -794,6 +794,7 @@ static unsigned long shrink_page_list(struct list_head *page_list, if (page_mapped(page) && mapping) { switch (try_to_unmap(page, ttu_flags)) { case SWAP_DISCARD: + count_vm_event(PGVOLATILE); goto discard_page; case SWAP_FAIL: goto activate_locked; diff --git a/mm/vmstat.c b/mm/vmstat.c index c737057..9fd8ead 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -747,6 +747,7 @@ const char * const vmstat_text[] = { TEXTS_FOR_ZONES("pgalloc") "pgfree", + "pgvolatile", "pgactivate", "pgdeactivate", -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

