mm: memcontrol: move kmem accounting code to CONFIG_MEMCG
The cgroup2 memory controller will account important in-kernel memory consumers per default. Move all necessary components to CONFIG_MEMCG. Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Acked-by: Vladimir Davydov <vdavydov@virtuozzo.com> Cc: Michal Hocko <mhocko@suse.cz> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
3893e302f6
commit
127424c86b
@@ -40,7 +40,7 @@ struct list_lru_node {
|
||||
spinlock_t lock;
|
||||
/* global list, used for the root cgroup in cgroup aware lrus */
|
||||
struct list_lru_one lru;
|
||||
#ifdef CONFIG_MEMCG_KMEM
|
||||
#if defined(CONFIG_MEMCG) && !defined(CONFIG_SLOB)
|
||||
/* for cgroup aware lrus points to per cgroup lists, otherwise NULL */
|
||||
struct list_lru_memcg *memcg_lrus;
|
||||
#endif
|
||||
@@ -48,7 +48,7 @@ struct list_lru_node {
|
||||
|
||||
struct list_lru {
|
||||
struct list_lru_node *node;
|
||||
#ifdef CONFIG_MEMCG_KMEM
|
||||
#if defined(CONFIG_MEMCG) && !defined(CONFIG_SLOB)
|
||||
struct list_head list;
|
||||
#endif
|
||||
};
|
||||
|
Reference in New Issue
Block a user