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 509DBC4706C for ; Tue, 16 Jan 2024 09:29:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D62276B0081; Tue, 16 Jan 2024 04:29:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D13E96B0082; Tue, 16 Jan 2024 04:29:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BDB116B0083; Tue, 16 Jan 2024 04:29:07 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id ACDCB6B0081 for ; Tue, 16 Jan 2024 04:29:07 -0500 (EST) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 6718414059E for ; Tue, 16 Jan 2024 09:29:07 +0000 (UTC) X-FDA: 81684650334.09.A2881D5 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) by imf16.hostedemail.com (Postfix) with ESMTP id 6D09A180008 for ; Tue, 16 Jan 2024 09:29:05 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=armlinux.org.uk header.s=pandora-2019 header.b="zyxRF1/e"; spf=none (imf16.hostedemail.com: domain of "linux+linux-mm=kvack.org@armlinux.org.uk" has no SPF policy when checking 78.32.30.218) smtp.mailfrom="linux+linux-mm=kvack.org@armlinux.org.uk"; dmarc=pass (policy=none) header.from=armlinux.org.uk ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1705397345; h=from:from:sender: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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=wsCbjUQ2hR0h4kZ3MX+VBUPxl0Ia2lfkvP41cApAIiI=; b=29TsnvEWcTst87jyVdC8w1TmuiLGfjTl0EwrIAEfBshCIqqgQfjErUDXferelxypZJx42u 3Oo+THuiDRjT2MdogrHa+cTD85gOjVsgbkvxdSO2OPFXEMJU8naXAqjSplFn05k7G0kvyD rcBNSHqH/B3bxqFS4lL4iucqMLqgLuc= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1705397345; a=rsa-sha256; cv=none; b=6qOM0veMD9KSYQ9NC8+lFbaEPfiodMDQ58vbZHLDIw6S/zFWjwlF2z7+YHFnl33e5x94fo Q/RATiqn8DWhRJ7pNXOWSmGw1ViLEQZGtMyx8ifKofKNH+LwY29QJoUF7SrD3Pzl2Rrr6z OiCRI2qy8MdDB4oZ2klcLOScjbvhyS0= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=armlinux.org.uk header.s=pandora-2019 header.b="zyxRF1/e"; spf=none (imf16.hostedemail.com: domain of "linux+linux-mm=kvack.org@armlinux.org.uk" has no SPF policy when checking 78.32.30.218) smtp.mailfrom="linux+linux-mm=kvack.org@armlinux.org.uk"; dmarc=pass (policy=none) header.from=armlinux.org.uk DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=wsCbjUQ2hR0h4kZ3MX+VBUPxl0Ia2lfkvP41cApAIiI=; b=zyxRF1/eGlPVxACpktDZP2ZAZW GiVBzc8zSYgDavUz97u6dz/z/ayLLRZHaUNIb7oO87f/HKIGVvDfkF80cWotblbgSRdBsPdhDm1WH VkJfePn/OxLqEGHlbmV5KzotUIKd1IqXfgA4ROymqvlv/J7IYdnTG6GsFNO7Y8lc5+U/0KohWYgIc npwfkiGYaq77szrdBFaGjevD9V/mmCcApryqUqc0PfFPdSEeMkpzmKEL2e0Bc2JRC/NV7o11sL/9b fiYiv97W0eAgwgrtdTSkv1ZzHYGB1BmxVtidThQwYofSfIkNlz2W6xhPxaGWYvIft3PFS5et27HSh TyiBe4kA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:44336) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rPfkZ-0003Ff-08; Tue, 16 Jan 2024 09:28:51 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1rPfkV-0003ll-0W; Tue, 16 Jan 2024 09:28:47 +0000 Date: Tue, 16 Jan 2024 09:28:46 +0000 From: "Russell King (Oracle)" To: Kefeng Wang Cc: "Christoph Lameter (Ampere)" , Anshuman Khandual , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Valentin.Schneider@arm.com, Vanshidhar Konda , Jonathan Cameron , Catalin Marinas , Robin Murphy , Dave Kleikamp , Matteo Carlini , akpm@linux-foundation.org, yang@os.amperecomputing.com Subject: Re: [PATCH] ARM64: Dynamically allocate cpumasks and increase supported CPUs to 512 Message-ID: References: <794a1211-630b-3ee5-55a3-c06f10df1490@linux.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 6D09A180008 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: bsxjtz35wsqj6cdyzd48uyb196333e8s X-HE-Tag: 1705397345-551697 X-HE-Meta: U2FsdGVk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XULt38rR7iEvk8xh9vFwOZicbQrcSE/+rHty9Czewu1j1CZ77l2SeH9vrYFdVaLFSI2Hlla/U5aqrT6H3+aWlMcCBjb98S/HWeEk5gGLSSMaqWypf8pDoOXw6KVdCWN285g3/oIsrTzuG3/CI/20gjz64wzOCbB59vec7QUSDdCrqW4J5Ku7bKRLR1Pq/xd3bpmrfI0dKEnLMSwd+s2c2WdVEfJB1IW+b7Ft3EqwfyN4836IBKO8nztMxe0pn2iSjTbfW4p8GPPFB5W4PeSwQ94er7QoQ1GdFeBGODNN9YWFFq73J4e/D6jO5yCfEA5bsfzsGb7iSuRwsEiyJ7TykiX98oZJpiEf8aJsy2KNMW1PiTQI2mxfSUqIvOq1VcXrSsWa7dQEi7P3aVpUjGz42C8YfgW8= 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 Tue, Jan 16, 2024 at 03:10:26PM +0800, Kefeng Wang wrote: > On 2024/1/15 23:39, Russell King (Oracle) wrote: > > On Thu, Dec 14, 2023 at 04:05:56PM -0800, Christoph Lameter (Ampere) wrote: > > > Index: linux/arch/arm64/Kconfig > > > =================================================================== > > > --- linux.orig/arch/arm64/Kconfig > > > +++ linux/arch/arm64/Kconfig > > > @@ -1407,7 +1407,21 @@ config SCHED_SMT > > > config NR_CPUS > > > int "Maximum number of CPUs (2-4096)" > > > range 2 4096 > > > > I think your mailer got to your patch and messed up the white space. > > There are two spaces before each of these lines rather than the usual > > one. > > > > > - default "256" > > > + default 512 > > > + > > > +# > > > +# Determines the placement of cpumasks. > > > +# > > > +# With CPUMASK_OFFSTACK the cpumasks are dynamically allocated. > > > +# Useful for machines with lots of core because it avoids increasing > > > +# the size of many of the data structures in the kernel. > > > +# > > > +# If this is off then the cpumasks have a static sizes and are > > > +# embedded within data structures. > > > +# > > > +config CPUMASK_OFFSTACK > > > + def_bool y > > > + depends on NR_CPUS > 256 > > > > Should that be ">= 256" ? > > Maybe just select CPUMASK_OFFSTACK if NR_CPUS >= 256, > > > But could we just make CPUMASK_OFFSTACK configurable and let user/distro > to enable it? > > diff --git a/lib/Kconfig b/lib/Kconfig > index 5ddda7c2ed9b..4254be5aa843 100644 > --- a/lib/Kconfig > +++ b/lib/Kconfig > @@ -535,7 +535,9 @@ config CHECK_SIGNATURE > bool > > config CPUMASK_OFFSTACK > - bool "Force CPU masks off stack" if DEBUG_PER_CPU_MAPS > + bool "Force CPU masks off stack" > + depends on SMP > + default n Please. No. There is no point in defining a default of n. The default default is n. Therefore, specifying a default of n is utterly redundant as the option will still default to n and just adds clutter to Kconfig files. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!