linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Shakeel Butt <shakeel.butt@linux.dev>,
	Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Michal Hocko <mhocko@kernel.org>,
	Roman Gushchin <roman.gushchin@linux.dev>,
	Muchun Song <muchun.song@linux.dev>,
	Alexei Starovoitov <ast@kernel.org>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Harry Yoo <harry.yoo@oracle.com>,
	Yosry Ahmed <yosry.ahmed@linux.dev>,
	bpf@vger.kernel.org, linux-mm@kvack.org, cgroups@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Meta kernel team <kernel-team@meta.com>
Subject: Re: [PATCH v2 1/7] memcg: memcg_rstat_updated re-entrant safe against irqs
Date: Thu, 15 May 2025 16:57:10 +0200	[thread overview]
Message-ID: <2d517f89-3bb4-4de2-8c14-8bb1e4235c7a@suse.cz> (raw)
In-Reply-To: <CAGj-7pUJQZD59Sx7E69Uvi1++dB59R8wWkDYvSTGYhU-18AHXg@mail.gmail.com>

On 5/15/25 16:31, Shakeel Butt wrote:
> On Thu, May 15, 2025 at 5:47 AM Lorenzo Stoakes
> <lorenzo.stoakes@oracle.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.


  parent reply	other threads:[~2025-05-15 14:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-14 18:41 [PATCH v2 0/7] memcg: make memcg stats irq safe Shakeel Butt
2025-05-14 18:41 ` [PATCH v2 1/7] memcg: memcg_rstat_updated re-entrant safe against irqs Shakeel Butt
2025-05-15 12:47   ` Lorenzo Stoakes
2025-05-15 14:31     ` Shakeel Butt
2025-05-15 14:53       ` Lorenzo Stoakes
2025-05-15 15:22         ` Shakeel Butt
2025-05-15 15:28           ` Lorenzo Stoakes
2025-05-15 14:57       ` Vlastimil Babka [this message]
2025-05-15 15:21         ` Shakeel Butt
2025-05-17  0:24     ` Alexei Starovoitov
2025-05-14 18:41 ` [PATCH v2 2/7] memcg: move preempt disable to callers of memcg_rstat_updated Shakeel Butt
2025-05-14 18:41 ` [PATCH v2 3/7] memcg: make mod_memcg_state re-entrant safe against irqs Shakeel Butt
2025-05-14 18:41 ` [PATCH v2 4/7] memcg: make count_memcg_events " Shakeel Butt
2025-05-14 18:41 ` [PATCH v2 5/7] memcg: make __mod_memcg_lruvec_state " Shakeel Butt
2025-05-14 18:41 ` [PATCH v2 6/7] memcg: no stock lock for cpu hot-unplug Shakeel Butt
2025-05-14 18:41 ` [PATCH v2 7/7] memcg: objcg stock trylock without irq disabling Shakeel Butt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2d517f89-3bb4-4de2-8c14-8bb1e4235c7a@suse.cz \
    --to=vbabka@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=ast@kernel.org \
    --cc=bigeasy@linutronix.de \
    --cc=bpf@vger.kernel.org \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=harry.yoo@oracle.com \
    --cc=kernel-team@meta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=mhocko@kernel.org \
    --cc=muchun.song@linux.dev \
    --cc=roman.gushchin@linux.dev \
    --cc=shakeel.butt@linux.dev \
    --cc=yosry.ahmed@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox