Commit 98c9daf5 authored by Roman Gushchin's avatar Roman Gushchin Committed by Andrew Morton

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.devSigned-off-by: default avatarRoman Gushchin <roman.gushchin@linux.dev>
Acked-by: default avatarShakeel 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: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 94b7e5bf
...@@ -92,6 +92,7 @@ struct mem_cgroup_per_node { ...@@ -92,6 +92,7 @@ struct mem_cgroup_per_node {
struct lruvec_stats *lruvec_stats; struct lruvec_stats *lruvec_stats;
struct shrinker_info __rcu *shrinker_info; struct shrinker_info __rcu *shrinker_info;
#ifdef CONFIG_MEMCG_V1
/* /*
* Memcg-v1 only stuff in middle as buffer between read mostly fields * Memcg-v1 only stuff in middle as buffer between read mostly fields
* and update often fields to avoid false sharing. Once v1 stuff is * and update often fields to avoid false sharing. Once v1 stuff is
...@@ -102,6 +103,7 @@ struct mem_cgroup_per_node { ...@@ -102,6 +103,7 @@ struct mem_cgroup_per_node {
unsigned long usage_in_excess;/* Set to the value by which */ unsigned long usage_in_excess;/* Set to the value by which */
/* the soft limit is exceeded*/ /* the soft limit is exceeded*/
bool on_tree; bool on_tree;
#endif
/* Fields which get updated often at the end. */ /* Fields which get updated often at the end. */
struct lruvec lruvec; struct lruvec lruvec;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment