The patch titled Subject: mm/memcontrol.c: fix memory.stat item ordering has been added to the -mm tree. Its filename is mm-memcontrol-fix-memorystat-item-ordering.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-memcontrol-fix-memorystat-item-ordering.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-memcontrol-fix-memorystat-item-ordering.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Johannes Weiner <hannes@xxxxxxxxxxx> Subject: mm/memcontrol.c: fix memory.stat item ordering 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@xxxxxxxxxxx Signed-off-by: Johannes Weiner <hannes@xxxxxxxxxxx> Cc: Rik van Riel <riel@xxxxxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- diff -puN mm/memcontrol.c~mm-memcontrol-fix-memorystat-item-ordering mm/memcontrol.c --- a/mm/memcontrol.c~mm-memcontrol-fix-memorystat-item-ordering +++ a/mm/memcontrol.c @@ -5597,6 +5597,13 @@ static int memory_stat_show(struct seq_f 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]); @@ -5607,13 +5614,6 @@ static int memory_stat_show(struct seq_f 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]); - return 0; } _ Patches currently in -mm which might be from hannes@xxxxxxxxxxx are mm-workingset-dont-drop-refault-information-prematurely-fix.patch mm-workingset-tell-cache-transitions-from-workingset-thrashing.patch delayacct-track-delays-from-thrashing-cache-pages.patch sched-loadavg-consolidate-load_int-load_frac-calc_load.patch sched-loadavg-consolidate-load_int-load_frac-calc_load-fix-fix.patch sched-loadavg-make-calc_load_n-public.patch sched-schedh-make-rq-locking-and-clock-functions-available-in-statsh.patch sched-introduce-this_rq_lock_irq.patch psi-pressure-stall-information-for-cpu-memory-and-io.patch psi-pressure-stall-information-for-cpu-memory-and-io-fix.patch psi-pressure-stall-information-for-cpu-memory-and-io-fix-2.patch psi-pressure-stall-information-for-cpu-memory-and-io-fix-3.patch psi-pressure-stall-information-for-cpu-memory-and-io-fix-4.patch psi-cgroup-support.patch mm-workingset-use-cheaper-__inc_lruvec_state-in-irqsafe-node-reclaim.patch mm-workingset-add-vmstat-counter-for-shadow-nodes.patch mm-zero-seek-shrinkers.patch mm-memcontrol-fix-memorystat-item-ordering.patch