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 18991C61CE8 for ; Thu, 12 Jun 2025 12:07:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AE2676B0089; Thu, 12 Jun 2025 08:07:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AB9BF6B008A; Thu, 12 Jun 2025 08:07:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9F77D6B008C; Thu, 12 Jun 2025 08:07:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 8095D6B0089 for ; Thu, 12 Jun 2025 08:07:18 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 39AFD161265 for ; Thu, 12 Jun 2025 12:07:18 +0000 (UTC) X-FDA: 83546623356.19.A4DFFBE Received: from out-182.mta1.migadu.com (out-182.mta1.migadu.com [95.215.58.182]) by imf13.hostedemail.com (Postfix) with ESMTP id 1E4A52000E for ; Thu, 12 Jun 2025 12:07:15 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=JWc+wzsz; spf=pass (imf13.hostedemail.com: domain of hao.ge@linux.dev designates 95.215.58.182 as permitted sender) smtp.mailfrom=hao.ge@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=1749730036; 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=twMWtt5I9SuDHYisxmZTCL86hyG0OQje5SjGYJRf63U=; b=XAiph/vjtJLQohDKBqFebQUDqYYuZvBEWuLMsFrvBoPUNFu8WplsKTp/ZfLl/DdRKKdYJ7 bsMH9UCEb6Vu4aUi8rdKX653UHYe28XuTHCAKy9SzA4aYXa5a8wGuguwLptey+/uilRGNI TPHboMpU7nYRv1KYLHOq1iOjfWkW+Wk= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=JWc+wzsz; spf=pass (imf13.hostedemail.com: domain of hao.ge@linux.dev designates 95.215.58.182 as permitted sender) smtp.mailfrom=hao.ge@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1749730036; a=rsa-sha256; cv=none; b=1vVbEtcw6tuoXJjwYXCMjzXdiobGsaJEOcpz/Xc4pNE7wYGPrbdGaO4gjh7pP/Vz0InPGl tqAewSWX6Rct2Cnk8KU7MPqA49MGiRaFuooC1PDPPUI4zVXDjz1aYRhy1iZq5Ku523qA7k P9JDYljmJ1HPbyWO2f87UvtO4ljPsUA= Message-ID: <496a782f-25f8-44c5-88dd-d2c56a585898@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1749730033; 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=twMWtt5I9SuDHYisxmZTCL86hyG0OQje5SjGYJRf63U=; b=JWc+wzszWrG3REVwsZ/H0wMVTrk+61CA7oerTFulwaE92d2MHsMIBtZh9AyiaQtH4Gq5Q7 c0xeBr+IvcBjxuQsiMj6XDHenRANn4zEnpPEcJLZlAfRY19UQN0CTWbTFtl6xEoEuYFDU/ 5l5lc14nsY6IJv/URMQcEgVS4qPe1HY= Date: Thu, 12 Jun 2025 20:06:25 +0800 MIME-Version: 1.0 Subject: Re: [PATCH 2/5] alpha: Modify the definition logic of WEAK_PER_CPU To: Heiko Carstens , Andrew Morton , Suren Baghdasaryan Cc: David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Richard Henderson , Matt Turner , Dennis Zhou , Tejun Heo , Christoph Lameter , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Kent Overstreet , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org, linux-s390@vger.kernel.org, Hao Ge References: <4d78498def57e0df4c768ad9eb672cac68fb51dc.1749715979.git.gehao@kylinos.cn> <20250612112215.10868Da1-hca@linux.ibm.com> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Hao Ge In-Reply-To: <20250612112215.10868Da1-hca@linux.ibm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT X-Rspamd-Queue-Id: 1E4A52000E X-Rspamd-Server: rspam07 X-Stat-Signature: 1hufoixm7tbkdes6q8ep3jfbyxjjm6ii X-Rspam-User: X-HE-Tag: 1749730035-705158 X-HE-Meta: U2FsdGVkX19zVSadxyL05icSU5OVL9RkZDMkg0DfaUgv2ydim1nTLZboiWFBSLJivowWQezgUpwrN42SznzuVXTFBOzzXsDE21Y2TjaSb11Cai6s8uMhoToy4NH9lxM/7Ly/AWyPyEpSn0UV+iKcefC4GD+NyBERiuJXgCduChzkH9VsToLxVuX09OfoQP9L9bp3qaPkOKz/mqzRqti+hPn/WmyULbnKRRRbUSa+yVKS6CUwbQ1yOvVXEt6JtTAVdJHmJqKtccMzt6dqDS7aEC1e/6p4JntzGefaRIIhG6cXE1pHs8wCrcGBafRUnrtcc/LM4UhDm+JLLYHKaOPDxjKKZjl/Olk2dkKU5vB+QjaQDmMYfMjpBO0h+rtY/lLkIvOMlPHR9LbitV1j2LN4JGGF9ERee6kOAQwvViYvjWpXoscFlOCrJpD5PxjbBalc1GugCs4dZPpkiRlZYAk0z/ZxFEgDjdrTXspp9v1pvu/8Df3hKpbV2iGRmazFvJ3xuQNBlqnQaMNSB4wbypMGZrmxBxxtFI1+wjqgb0rDuuAKf6oxxD2rppQ2RfaLJAloKKbCct4/hCDcUg85HkKW2WxecIMQVvf4iA57zRaq4IiWqsQ8w2RYM0JzAidz5Y3aTRbBw2sw5ytZvW50gq0xc0lGWJKEymTfn3CkakpOUuOTVL1JyPH7xR8ytMrs1nc3dz8T1K51+dw3NxPKsjLsZLYg9xh2hW/e2RgobiTxEHS3mP3d7Wh5ewsB69w58XXUhc9drVJ51E81HCs2GA4Cxtx0TBLCnmA3EoUvPGgV5hPtJMUA5CanFXR3ki7zuZ+3pUYfLd6ZkmFFbKDdW6EM66tKtyqdZuO/VwnrBPzcmBMLn4GpIdgf9GAYdGtaz3oddY6bOSkg642PPLHwVznmTQmeWqkYmPvv+HeEdSFuY8L7Jdbo72ZZ7fMbYuBTsUT2ifiN4J2gAD3ZAFBhviT A9bZ24Xe geVg+lG1NyfEGwEjp2Tk+uSahA+DLAuxxkUSPi1pJOU7zjO0i6lxX5JRCaLInN4uSOjechH/Qnp3I2RErFCFomUOHuPgKoob6stH6vU+3z8ch9yF99WOAAg4+yIEuhBtEdUQfm6jcFlmxVN5rGC7copZHqDRH06+N39Usp2IXoG8KrDBBiHA4I0jCz32xKRY+YwdrVc3C7g9MskmG5Exb/k6Q84V01HV/CF4ATD27TprI91ZjNincdj4kWwQ+ai4JvzKbk3c1eEV6UIw8lnFN/D+3oggJ7wcozwqt 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 2025/6/12 19:22, Heiko Carstens wrote: > On Thu, Jun 12, 2025 at 04:27:27PM +0800, Hao Ge wrote: >> From: Hao Ge >> >> As stated in the first patch of this patch series, >> we make ARCH_NEEDS_WEAK_PER_CPU a Kconfig option, >> and replace all instances of ARCH_NEEDS_WEAK_PER_CPU >> in the kernel code with MODULE_NEEDS_WEAK_PER_CPU, >> gated by #ifdef CONFIG_ARCH_NEEDS_WEAK_PER_CPU. >> >> We'll make corresponding changes for the alpha >> architecture. >> >> Suggested-by: Suren Baghdasaryan >> Signed-off-by: Hao Ge >> --- >> arch/alpha/Kconfig | 1 + >> arch/alpha/include/asm/percpu.h | 4 ++-- >> 2 files changed, 3 insertions(+), 2 deletions(-) > ... > >> + select ARCH_NEEDS_WEAK_PER_CPU >> select ARCH_NO_PREEMPT >> select ARCH_NO_SG_CHAIN >> select ARCH_USE_CMPXCHG_LOCKREF >> diff --git a/arch/alpha/include/asm/percpu.h b/arch/alpha/include/asm/percpu.h >> index 6923249f2d49..5d8b75ec3bf2 100644 >> --- a/arch/alpha/include/asm/percpu.h >> +++ b/arch/alpha/include/asm/percpu.h >> @@ -10,8 +10,8 @@ >> * >> * Always use weak definitions for percpu variables in modules. >> */ >> -#if defined(MODULE) && defined(CONFIG_SMP) >> -#define ARCH_NEEDS_WEAK_PER_CPU >> +#if defined(MODULE) && defined(CONFIG_SMP) && defined(CONFIG_ARCH_NEEDS_WEAK_PER_CPU) >> +#define MODULE_NEEDS_WEAK_PER_CPU Hi Heiko Thank you for taking the time to review these patches. > CONFIG_ARCH_NEEDS_WEAK_PER_CPU is always set with the above select. > So there is no point in adding this to the check. Yes, that's exactly the case. > Furthermore this removes ARCH_NEEDS_WEAK_PER_CPU and defines > MODULE_NEEDS_WEAK_PER_CPU while the common code conversion happens > only with patch 4. Or in other words: if patches are split like this > things break. > > Same is true for patch 3. Just merging patches 2-4 would be the > easiest solution to this problem. I think this should be CC'd to the stable branch. I'm wondering if these need to be integrated into a single patch. I'm not sure. What do you think? Hi Andrew and Suren How do you see this? Any suggestions? Thanks Best Regards Hao