Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mm: memcg: guard memcg1-specific members of struct mem_cgroup_per_node

Put memcg1-specific members of struct mem_cgroup_per_node under the
CONFIG_MEMCG_V1 config option.

Link: https://lkml.kernel.org/r/20240628210317.272856-8-roman.gushchin@linux.dev
Signed-off-by: Roman Gushchin <roman.gushchin@linux.dev>
Acked-by: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Roman Gushchin and committed by
Andrew Morton
98c9daf5 94b7e5bf

+2
+2
include/linux/memcontrol.h
··· 92 92 struct lruvec_stats *lruvec_stats; 93 93 struct shrinker_info __rcu *shrinker_info; 94 94 95 + #ifdef CONFIG_MEMCG_V1 95 96 /* 96 97 * Memcg-v1 only stuff in middle as buffer between read mostly fields 97 98 * and update often fields to avoid false sharing. Once v1 stuff is ··· 103 102 unsigned long usage_in_excess;/* Set to the value by which */ 104 103 /* the soft limit is exceeded*/ 105 104 bool on_tree; 105 + #endif 106 106 107 107 /* Fields which get updated often at the end. */ 108 108 struct lruvec lruvec;