From: Johannes Weiner Date: Tue, 29 May 2012 22:07:07 +0000 (-0700) Subject: mm: memcg: group swapped-out statistics counter logically X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=fad02c2de0623fc6d4ff12ca72b60ea521118681;p=openwrt%2Fstaging%2Fblogic.git mm: memcg: group swapped-out statistics counter logically The counter of currently swapped out pages in a memcg (hierarchy) is sitting amidst ever-increasing event counters. Move this item to the other counters that reflect current state rather than history. This technically breaks the kernel ABI, but hopefully nobody relies on the order of items in memory.stat. Signed-off-by: Johannes Weiner Acked-by: Michal Hocko Acked-by: KAMEZAWA Hiroyuki Cc: Ying Han Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/memcontrol.c b/mm/memcontrol.c index b7b230606f2c..1118e02a40b6 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -4043,9 +4043,9 @@ enum { MCS_CACHE, MCS_RSS, MCS_FILE_MAPPED, + MCS_SWAP, MCS_PGPGIN, MCS_PGPGOUT, - MCS_SWAP, MCS_PGFAULT, MCS_PGMAJFAULT, MCS_INACTIVE_ANON, @@ -4064,9 +4064,9 @@ static const char *memcg_stat_strings[NR_MCS_STAT] = { "cache", "rss", "mapped_file", + "swap", "pgpgin", "pgpgout", - "swap", "pgfault", "pgmajfault", "inactive_anon",