diff options
author | 2024-06-28 21:03:15 +0000 | |
---|---|---|
committer | 2024-07-04 18:05:57 -0700 | |
commit | 98c9daf5ae6be008f78c07b744bcff7bcc6e98da (patch) | |
tree | 6c44df177d0296775daf117c82167a90256cf80c /include/linux/memcontrol.h | |
parent | mm: memcg: put memcg1-specific struct mem_cgroup's members under CONFIG_MEMCG_V1 (diff) | |
download | linux-rng-98c9daf5ae6be008f78c07b744bcff7bcc6e98da.tar.xz linux-rng-98c9daf5ae6be008f78c07b744bcff7bcc6e98da.zip |
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>
Diffstat (limited to '')
-rw-r--r-- | include/linux/memcontrol.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 107b0c5d6eab..c7ef628ee882 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h @@ -92,6 +92,7 @@ struct mem_cgroup_per_node { struct lruvec_stats *lruvec_stats; struct shrinker_info __rcu *shrinker_info; +#ifdef CONFIG_MEMCG_V1 /* * Memcg-v1 only stuff in middle as buffer between read mostly fields * and update often fields to avoid false sharing. Once v1 stuff is @@ -102,6 +103,7 @@ struct mem_cgroup_per_node { unsigned long usage_in_excess;/* Set to the value by which */ /* the soft limit is exceeded*/ bool on_tree; +#endif /* Fields which get updated often at the end. */ struct lruvec lruvec; |