[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <oqw3rhbai4zzr3g7mpjbq7zosatifn5lpbuqu4w732ksnfxxn2@hhut62hpdl2h>
Date: Thu, 15 May 2025 08:21:25 -0700
From: Shakeel Butt <shakeel.butt@...ux.dev>
To: Vlastimil Babka <vbabka@...e.cz>
Cc: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
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>, Alexei Starovoitov <ast@...nel.org>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>, Harry Yoo <harry.yoo@...cle.com>,
Yosry Ahmed <yosry.ahmed@...ux.dev>, bpf@...r.kernel.org, linux-mm@...ck.org, cgroups@...r.kernel.org,
linux-kernel@...r.kernel.org, Meta kernel team <kernel-team@...a.com>
Subject: Re: [PATCH v2 1/7] memcg: memcg_rstat_updated re-entrant safe
against irqs
On Thu, May 15, 2025 at 04:57:10PM +0200, Vlastimil Babka wrote:
> On 5/15/25 16:31, Shakeel Butt wrote:
> > On Thu, May 15, 2025 at 5:47 AM Lorenzo Stoakes
> > <lorenzo.stoakes@...cle.com> wrote:
> >>
> >> Shakeel - This breaks the build in mm-new for me:
> >>
> >> CC mm/pt_reclaim.o
> >> In file included from ./arch/x86/include/asm/rmwcc.h:5,
> >> from ./arch/x86/include/asm/bitops.h:18,
> >> from ./include/linux/bitops.h:68,
> >> from ./include/linux/radix-tree.h:11,
> >> from ./include/linux/idr.h:15,
> >> from ./include/linux/cgroup-defs.h:13,
> >> from mm/memcontrol.c:28:
> >> mm/memcontrol.c: In function ‘mem_cgroup_alloc’:
> >> ./arch/x86/include/asm/percpu.h:39:45: error: expected identifier or ‘(’ before ‘__seg_gs’
> >> 39 | #define __percpu_seg_override CONCATENATE(__seg_, __percpu_seg)
> >> | ^~~~~~
> >> ./include/linux/args.h:25:24: note: in definition of macro ‘__CONCAT’
> >> 25 | #define __CONCAT(a, b) a ## b
> >> | ^
> >> ./arch/x86/include/asm/percpu.h:39:33: note: in expansion of macro ‘CONCATENATE’
> >> 39 | #define __percpu_seg_override CONCATENATE(__seg_, __percpu_seg)
> >> | ^~~~~~~~~~~
> >> ./arch/x86/include/asm/percpu.h:93:33: note: in expansion of macro ‘__percpu_seg_override’
> >> 93 | # define __percpu_qual __percpu_seg_override
> >> | ^~~~~~~~~~~~~~~~~~~~~
> >> ././include/linux/compiler_types.h:60:25: note: in expansion of macro ‘__percpu_qual’
> >> 60 | # define __percpu __percpu_qual BTF_TYPE_TAG(percpu)
> >> | ^~~~~~~~~~~~~
> >> mm/memcontrol.c:3700:45: note: in expansion of macro ‘__percpu’
> >> 3700 | struct memcg_vmstats_percpu *statc, __percpu *pstatc_pcpu;
> >> | ^~~~~~~~
> >> mm/memcontrol.c:3731:25: error: ‘pstatc_pcpu’ undeclared (first use in this function); did you mean ‘kstat_cpu’?
> >> 3731 | pstatc_pcpu = parent->vmstats_percpu;
> >> | ^~~~~~~~~~~
> >> | kstat_cpu
> >> mm/memcontrol.c:3731:25: note: each undeclared identifier is reported only once for each function it appears in
> >>
> >> The __percpu macro seems to be a bit screwy with comma-delimited decls, as it
> >> seems that putting this on its own line fixes this problem:
> >>
> >
> > Which compiler (and version) is this? Thanks for the fix.
>
> Hm right I see the same errors with gcc 7, 13, 14, 15 but not with clang.
It seems to work with gcc 11.5.0, so weird.
Powered by blists - more mailing lists