mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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/[email protected] Signed-off-by: Johannes Weiner <[email protected]> Acked-by: Vladimir Davydov <[email protected]> Cc: Michal Hocko <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
df0e53d061
commit
71cd31135d
6 changed files with 123 additions and 138 deletions
|
|
@ -2046,8 +2046,7 @@ static bool inactive_list_is_low(struct lruvec *lruvec, bool file,
|
|||
active = lruvec_lru_size(lruvec, active_lru, sc->reclaim_idx);
|
||||
|
||||
if (memcg)
|
||||
refaults = mem_cgroup_read_stat(memcg,
|
||||
MEMCG_WORKINGSET_ACTIVATE);
|
||||
refaults = mem_cgroup_read_stat(memcg, WORKINGSET_ACTIVATE);
|
||||
else
|
||||
refaults = node_page_state(pgdat, WORKINGSET_ACTIVATE);
|
||||
|
||||
|
|
@ -2735,7 +2734,7 @@ static void snapshot_refaults(struct mem_cgroup *root_memcg, pg_data_t *pgdat)
|
|||
|
||||
if (memcg)
|
||||
refaults = mem_cgroup_read_stat(memcg,
|
||||
MEMCG_WORKINGSET_ACTIVATE);
|
||||
WORKINGSET_ACTIVATE);
|
||||
else
|
||||
refaults = node_page_state(pgdat, WORKINGSET_ACTIVATE);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue