aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmscan.c
diff options
context:
space:
mode:
authorJohannes Weiner <hannes@cmpxchg.org>2017-05-03 17:55:13 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-05-03 18:52:11 -0400
commit71cd31135d4cf030a057ed7079a75a40c0a4a796 (patch)
treec95c8da1e70c21e412d9ab7328fc414ecfb80451 /mm/vmscan.c
parentdf0e53d0619e83b465e363c088bf4eeb2848273b (diff)
mm: memcontrol: re-use node VM page state enum
The current duplication is a high-maintenance mess, and it's painful to add new items or query memcg state from the rest of the VM. This increases the size of the stat array marginally, but we should aim to track all these stats on a per-cgroup level anyway. Link: http://lkml.kernel.org/r/20170404220148.28338-3-hannes@cmpxchg.org Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Acked-by: Vladimir Davydov <vdavydov.dev@gmail.com> Cc: Michal Hocko <mhocko@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r--mm/vmscan.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index fbec74af2b69..417b6657e994 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2046,8 +2046,7 @@ static bool inactive_list_is_low(struct lruvec *lruvec, bool file,
2046 active = lruvec_lru_size(lruvec, active_lru, sc->reclaim_idx); 2046 active = lruvec_lru_size(lruvec, active_lru, sc->reclaim_idx);
2047 2047
2048 if (memcg) 2048 if (memcg)
2049 refaults = mem_cgroup_read_stat(memcg, 2049 refaults = mem_cgroup_read_stat(memcg, WORKINGSET_ACTIVATE);
2050 MEMCG_WORKINGSET_ACTIVATE);
2051 else 2050 else
2052 refaults = node_page_state(pgdat, WORKINGSET_ACTIVATE); 2051 refaults = node_page_state(pgdat, WORKINGSET_ACTIVATE);
2053 2052
@@ -2735,7 +2734,7 @@ static void snapshot_refaults(struct mem_cgroup *root_memcg, pg_data_t *pgdat)
2735 2734
2736 if (memcg) 2735 if (memcg)
2737 refaults = mem_cgroup_read_stat(memcg, 2736 refaults = mem_cgroup_read_stat(memcg,
2738 MEMCG_WORKINGSET_ACTIVATE); 2737 WORKINGSET_ACTIVATE);
2739 else 2738 else
2740 refaults = node_page_state(pgdat, WORKINGSET_ACTIVATE); 2739 refaults = node_page_state(pgdat, WORKINGSET_ACTIVATE);
2741 2740