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 <mtk.manpages@xxxxxxxxx> Cc: Arun Sharma <asharma@xxxxxx> Cc: sanjay@xxxxxxxxxx Cc: Paul Turner <pjt@xxxxxxxxxx> CC: David Rientjes <rientjes@xxxxxxxxxx> Cc: John Stultz <john.stultz@xxxxxxxxxx> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Cc: Christoph Lameter <cl@xxxxxxxxx> Cc: Android Kernel Team <kernel-team@xxxxxxxxxxx> Cc: Robert Love <rlove@xxxxxxxxxx> Cc: Mel Gorman <mel@xxxxxxxxx> Cc: Hugh Dickins <hughd@xxxxxxxxxx> Cc: Dave Hansen <dave@xxxxxxxxxxxxxxxxxx> Cc: Rik van Riel <riel@xxxxxxxxxx> Cc: Dave Chinner <david@xxxxxxxxxxxxx> Cc: Neil Brown <neilb@xxxxxxx> Cc: Mike Hommey <mh@xxxxxxxxxxxx> Cc: Taras Glek <tglek@xxxxxxxxxxx> Cc: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxx> Cc: Christoph Lameter <cl@xxxxxxxxx> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> Signed-off-by: Minchan Kim <minchan@xxxxxxxxxx> --- 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, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>