[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20241027173338.148147-1-sj@kernel.org>
Date: Sun, 27 Oct 2024 10:33:38 -0700
From: SeongJae Park <sj@...nel.org>
To: Shakeel Butt <shakeel.butt@...ux.dev>
Cc: SeongJae Park <sj@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Johannes Weiner <hannes@...xchg.org>,
Michal Hocko <mhocko@...nel.org>,
Roman Gushchin <roman.gushchin@...ux.dev>,
Muchun Song <muchun.song@...ux.dev>,
Hugh Dickins <hughd@...gle.com>,
Yosry Ahmed <yosryahmed@...gle.com>,
linux-mm@...ck.org,
cgroups@...r.kernel.org,
linux-kernel@...r.kernel.org,
Meta kernel team <kernel-team@...a.com>,
Yu Zhao <yuzhao@...gle.com>
Subject: Re: [PATCH v2] memcg: workingset: remove folio_memcg_rcu usage
On Sat, 26 Oct 2024 23:55:14 -0700 Shakeel Butt <shakeel.butt@...ux.dev> wrote:
[...]
It seems like folio_memcg_charged() is not defined for CONFIG_MEMCG=n
> config option. The following stub should fix the build for such config.
>
>
> diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
> index 89a1e9f10e1b..5502aa8e138e 100644
> --- a/include/linux/memcontrol.h
> +++ b/include/linux/memcontrol.h
> @@ -1055,6 +1055,11 @@ static inline struct mem_cgroup *folio_memcg(struct folio *folio)
> return NULL;
> }
>
> +static inline bool folio_memcg_charged(struct folio *folio)
> +{
> + return false;
> +}
> +
> static inline struct mem_cgroup *folio_memcg_check(struct folio *folio)
> {
> return NULL;
Tested-by: SeongJae Park <sj@...nel.org>
Thanks,
SJ
Powered by blists - more mailing lists