Received: by 2002:a05:7412:8d09:b0:fa:4c10:6cad with SMTP id bj9csp334667rdb; Tue, 16 Jan 2024 01:29:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IFCLXkmK0akjAax7Th41ttD7TM5VqJmAKFdaeQh4PW3k15HZVC97mf67uBzxJedy+QVH/sI X-Received: by 2002:a05:6512:282a:b0:50e:fc9e:b8c1 with SMTP id cf42-20020a056512282a00b0050efc9eb8c1mr1498847lfb.31.1705397352058; Tue, 16 Jan 2024 01:29:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705397352; cv=none; d=google.com; s=arc-20160816; b=hiXi0f4KaejzMePT688x0zumtYCwMP4YX5FnEg0yQH16uqd4ve9KMS5TYfOT9MJ/b5 WDmHgB4R0afqssijwrcEKPJGa2qo5c3H0hTngv5mjAazhEnYJiMmh86yN43xYcfndm1/ V+nWq1bwgnL+pDM2K4ZeYOPAG9vWiiDEEHPmEmBUVIq46C5zUg563h83AUzvhM5d1TpK IZXSssm7SljMavkIOStE0Ny/ftWX9e6cRgwAzzQ5RMIkfL8K/pWc5KcrnJ8Op31Jcqj8 BHDuCwCIBz7no3zVcIof59i/OmVKLqJeZIONY/Rc7Wi5OyMpX8YA2MKrrH/VgaDDDiMo ZAjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=wsCbjUQ2hR0h4kZ3MX+VBUPxl0Ia2lfkvP41cApAIiI=; fh=yvTYCahiVPJR2IY4AwmYQOYTSVawbE930qkA+VKECsM=; b=jMiynF5GGnsF+/UaQIMG4vKkfRI8KRqsT5S1FcmaytB8nu+2WZqqbBbwzvp4NSA1f/ IkLk7nBzDCHWIQeUo7MtjDgoi42VHFMsWcYqbBe4f5MLlzNEKBDuzFDk0ZqnBBXuuVoc g6Lq/f9AikwLz4OaPrWjsQtPOikhwMEG/yk8mrZhBFecx2oxN28Az4qHY9ys9E9ref2s 1SuzkC79WulT5uDB44I574X5BlMWYODUDcCCLSOhdG4Lof9ysTHQ3xZ8ey8Yh7/6k4tq zKCJrDjE/jjxUcIcRxQLuAadR9ZNrhndGhkVpTMlAN5uifAjZDjnNhX8tyW0hU/+58Oa zYlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="zyxRF1/e"; spf=pass (google.com: domain of linux-kernel+bounces-27172-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-27172-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id d13-20020a170906344d00b00a2d5ed5bdffsi2535157ejb.423.2024.01.16.01.29.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 01:29:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-27172-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="zyxRF1/e"; spf=pass (google.com: domain of linux-kernel+bounces-27172-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-27172-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id ABDB71F24272 for ; Tue, 16 Jan 2024 09:29:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9EC3B12B7F; Tue, 16 Jan 2024 09:29:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="zyxRF1/e" Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0D9AE12B66 for ; Tue, 16 Jan 2024 09:29:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Russell King (Oracle) 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!