mm: memcontrol: replace node summing with memcg_page_state()

Instead of adding up the node counters, use memcg_page_state() to get the
memcg state directly.  This is a bit cheaper and more stream-lined.

Signed-off-by: Johannes Weiner <>
Reviewed-by: Roman Gushchin <>
Cc: Michal Hocko <>
Cc: Tejun Heo <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
1 file changed