mm: memcontrol: eliminate raw access to stat and event counters
authorJohannes Weiner <hannes@cmpxchg.org>
Tue, 29 Dec 2020 02:33:42 +0000 (02:33 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 9 Jan 2021 12:37:37 +0000 (13:37 +0100)
commitfdcda71d87acfe8f645f3ce5e9303688cad8b8f1
treeaa3b377d4477ffba6347f680f65e7c5e8c2d82e3
parentf8181d33515448cf8e2c80b1307775b0b857f8cd
mm: memcontrol: eliminate raw access to stat and event counters

commit c9019e9bf42e66d028d70d2da6206cad4dd9250d upstream

Replace all raw 'this_cpu_' modifications of the stat and event per-cpu
counters with API functions such as mod_memcg_state().

This makes the code easier to read, but is also in preparation for the
next patch, which changes the per-cpu implementation of those counters.

Link: http://lkml.kernel.org/r/20171103153336.24044-1-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>
Cc: <stable@vger.kernel.org>
Signed-off-by: Shaoying Xu <shaoyi@amazon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/memcontrol.h
mm/memcontrol.c