From dfe8d0adf9613ed998506b766c258b8f34414fc9 Mon Sep 17 00:00:00 2001 From: Johannes Weiner Date: Sat, 10 Oct 2020 15:40:33 +0800 Subject: [PATCH] mm/memcontrol.c: fix memory.stat item ordering mainline inclusion from mainline-v4.20-rc1 commit e9b257ed150c1f43912bd66031185598451f68a9 category: bugfix bugzilla: 34611 CVE: NA ------------------------------------------------- The refault stats go better with the page fault stats, and are of higher interest than the stats on LRU operations. In fact they used to be grouped together; when the LRU operation stats were added later on, they were wedged in between. Move them back together. Documentation/admin-guide/cgroup-v2.rst already lists them in the right order. Link: http://lkml.kernel.org/r/20181010140239.GA2527@cmpxchg.org Signed-off-by: Johannes Weiner Cc: Rik van Riel Cc: Michal Hocko Cc: Peter Zijlstra (Intel) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Confilicts: mm/memcontrol.c Signed-off-by: Chen Zhou Signed-off-by: Liu Shixin Reviewed-by: Kefeng Wang Signed-off-by: Yang Yingliang --- mm/memcontrol.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 30b08fde6481..c5fbf0b29348 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -5768,6 +5768,13 @@ static int memory_stat_show(struct seq_file *m, void *v) seq_printf(m, "pgfault %lu\n", acc.events[PGFAULT]); seq_printf(m, "pgmajfault %lu\n", acc.events[PGMAJFAULT]); + seq_printf(m, "workingset_refault %lu\n", + acc.stat[WORKINGSET_REFAULT]); + seq_printf(m, "workingset_activate %lu\n", + acc.stat[WORKINGSET_ACTIVATE]); + seq_printf(m, "workingset_nodereclaim %lu\n", + acc.stat[WORKINGSET_NODERECLAIM]); + seq_printf(m, "pgrefill %lu\n", acc.events[PGREFILL]); seq_printf(m, "pgscan %lu\n", acc.events[PGSCAN_KSWAPD] + acc.events[PGSCAN_DIRECT]); @@ -5778,13 +5785,6 @@ static int memory_stat_show(struct seq_file *m, void *v) seq_printf(m, "pglazyfree %lu\n", acc.events[PGLAZYFREE]); seq_printf(m, "pglazyfreed %lu\n", acc.events[PGLAZYFREED]); - seq_printf(m, "workingset_refault %lu\n", - acc.stat[WORKINGSET_REFAULT]); - seq_printf(m, "workingset_activate %lu\n", - acc.stat[WORKINGSET_ACTIVATE]); - seq_printf(m, "workingset_nodereclaim %lu\n", - acc.stat[WORKINGSET_NODERECLAIM]); - #ifdef CONFIG_TRANSPARENT_HUGEPAGE seq_printf(m, "thp_fault_alloc %lu\n", acc.events[THP_FAULT_ALLOC]); seq_printf(m, "thp_collapse_alloc %lu\n", -- GitLab