From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0537CC2D0CD for ; Thu, 15 May 2025 15:21:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BDF706B00A2; Thu, 15 May 2025 11:21:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B8F6C6B00A6; Thu, 15 May 2025 11:21:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A56C76B00A9; Thu, 15 May 2025 11:21:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 864556B00A2 for ; Thu, 15 May 2025 11:21:35 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id DC2C71402B4 for ; Thu, 15 May 2025 15:21:35 +0000 (UTC) X-FDA: 83445506550.01.F808587 Received: from out-178.mta0.migadu.com (out-178.mta0.migadu.com [91.218.175.178]) by imf11.hostedemail.com (Postfix) with ESMTP id EDE4540009 for ; Thu, 15 May 2025 15:21:33 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=f2RhhZz5; spf=pass (imf11.hostedemail.com: domain of shakeel.butt@linux.dev designates 91.218.175.178 as permitted sender) smtp.mailfrom=shakeel.butt@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1747322494; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=vNQ362kPh2DAdnB+ckUbQSAnkMVDAHgeooSh5BHonV0=; b=3ADsLVrsvIzMqsqnJrQ11EF5srkPXkcTEvXmrpINdUCrFjPN3C2gcMLzX/I//jAw6K0jtq yFgC/qnW7KFBo8gKV2E8MuvfVeaGZuBlyfydcVeyx3Vg6498VhhGFmCTpsl07MC3VsvUu8 5E5PYrpJO3cROBrDj/DDgqLI1Mxl/rc= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=f2RhhZz5; spf=pass (imf11.hostedemail.com: domain of shakeel.butt@linux.dev designates 91.218.175.178 as permitted sender) smtp.mailfrom=shakeel.butt@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1747322494; a=rsa-sha256; cv=none; b=dEUWmNZrmmaQCY0l8/TlaYaErcJLISpwM8HSJoQ3CcRay0rkor2FDJz5PtFx9wjWTu9gPz FftbZQl6BDuMDjOIyvY00zn4guEStn2QRE/JzbL9bD0y4U7r3vVexvRv1cJG0XasHGi+eW daxsQVAPP9STXkgNH1BrqP7zQaAOxJ8= Date: Thu, 15 May 2025 08:21:25 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1747322491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vNQ362kPh2DAdnB+ckUbQSAnkMVDAHgeooSh5BHonV0=; b=f2RhhZz5GTNImie0TBvWXUh6tKuxj+d+dSQyeRxcyIxUPzyeYz3yGUoWQ+dZ6nCKrLcmST rKyfkemIxryRt9zwqMVYyPc9lGs4Cc1HptTDtwbsUARhkCBUBNcogHcn1i9ydwJ8FuCXym m+rJ4+jr/48NgW11U0/p/AEjp79HL9Q= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Shakeel Butt To: Vlastimil Babka Cc: Lorenzo Stoakes , Andrew Morton , Johannes Weiner , Michal Hocko , Roman Gushchin , Muchun Song , Alexei Starovoitov , Sebastian Andrzej Siewior , Harry Yoo , Yosry Ahmed , bpf@vger.kernel.org, linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, Meta kernel team Subject: Re: [PATCH v2 1/7] memcg: memcg_rstat_updated re-entrant safe against irqs Message-ID: References: <20250514184158.3471331-1-shakeel.butt@linux.dev> <20250514184158.3471331-2-shakeel.butt@linux.dev> <22f69e6e-7908-4e92-96ca-5c70d535c439@lucifer.local> <2d517f89-3bb4-4de2-8c14-8bb1e4235c7a@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2d517f89-3bb4-4de2-8c14-8bb1e4235c7a@suse.cz> X-Migadu-Flow: FLOW_OUT X-Stat-Signature: uzwimr5pcdmm4rzibmngzt37xakqm3iu X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: EDE4540009 X-HE-Tag: 1747322493-150588 X-HE-Meta: U2FsdGVkX1+Hz/dO4cOEMUrQbp9benrZRKJGtAD0Px0vdDxdzr0Mrd/y92b2uJA5Wu7KrPF4ijHVAlHEEPH0ZaDco3ERoKwPTgCkUUeO6XnyM4SWMq+NAvmLU2lMrSnEOD0cOzbWBALYccsFB2ikIRzJBrbFCZOGmRjKEVhvuO4jGhbAcEbO9ML80nmK41QFbkDB9sMk3sHf96lvgjvaqiTvoIc4QGXBikaxCQe3VmDNgCC2TmXEsDXReMIhsJn1OioAF0tno1NeUWoaiB+Uv2fv/RwK3q0wzCBp0PQg4CvAvAV20KFoiApbLpYb/aurzzzvSivkawnJW5NliuF/At2OxLh6lg5h+jfv8SMoxcyEop5FlKwaOxnixtDfFbYE5ntzVvwKM6pFopCi3mmZDEPxgOBjwP2HMG8FUU1dUmZMz3HMwCxJz0PMWpE2HZcmTufZFONGUUM2NyB8iIwSmRDGAOmANxMF1JzksQah7VZE7o0PGyQjoX+1vKM1a2Dcip2MvW4GSpMldWQFLYP8twsZuoNy7B8Twjk19XzMF77BY0SHaTYmXViG89v6LxW/ub8DgiQWoa4kVSW6ZOR5TcvTEkKscglpYpaogtnRB8e+omFcH3oc0q1/t42uT2KUd4J8oc9TyknnbPuUAeHqe1gc6WgOgMBorG3ZaulD+LqPRiHiCFctmG5SP80IwBnMY2ZeJYQppCRJP6PM49I8fUqeJb+fkA6Jy53DNK5i4klk5th8K3kVdhim2cm4xdTRTTS1nyKjN6E8atNq4EiobHuxPk/OXbi8K7WyqmrW6a0JegArev5Z6hMhbbVjIn4LcC+t4Xh12cc8YQxV2NOa62W59tQTQ54qs2LhCJl5MlPdUfEln3YJBU8nCqVlAYLf74NGbdoUehaCzu/zVKeT2tNRlRHh0bgVf9XRQZbei/6Fq8YRIb+J/gSTA1Ue85ZFpu7ZUHiInpc30OqBzkF NRoY8NLS FNXatUvANnEIYKcxn+PFNqeTnGCqTKyHh//VQiMgNFciosISRAUu9zp4ZUj6BhhHC58hsS335Bre7tbHCGBuRX4z9cdwAeZUesgfj9RQEd8U3/gQalJ2Ca/btvnAIoNbwGZoDWDp91QIGlswwkAueuanMimEprwxIAoF+eVrj141ZxEepotBos0U5pkxCmNapnAcx9Y/iRzGRu7vS3JzI7c29+Vkjjy22wgqtIv3kQR1hWWjPAEZeO3PQp9mjnaNjoyvsRjjQcR+t+3KdOkogMWdWxQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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 > > 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.