mm: memcontrol: account kernel stack per node
authorShakeel Butt <shakeelb@google.com>
Fri, 7 Aug 2020 06:21:37 +0000 (23:21 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 7 Aug 2020 18:33:25 +0000 (11:33 -0700)
commit991e7673859ed41e7ba83c8c4e57afe8cfebe314
treeaa52b23335d5c32f8ece153f5e9b164729a6fbd4
parentfbc1ac9d09d70859eee24131d667e01e3986e368
mm: memcontrol: account kernel stack per node

Currently the kernel stack is being accounted per-zone.  There is no need
to do that.  In addition due to being per-zone, memcg has to keep a
separate MEMCG_KERNEL_STACK_KB.  Make the stat per-node and deprecate
MEMCG_KERNEL_STACK_KB as memcg_stat_item is an extension of
node_stat_item.  In addition localize the kernel stack stats updates to
account_kernel_stack().

Signed-off-by: Shakeel Butt <shakeelb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Roman Gushchin <guro@fb.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Link: http://lkml.kernel.org/r/20200630161539.1759185-1-shakeelb@google.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/base/node.c
fs/proc/meminfo.c
include/linux/memcontrol.h
include/linux/mmzone.h
kernel/fork.c
kernel/scs.c
mm/memcontrol.c
mm/page_alloc.c
mm/vmstat.c