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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E6DF6C47077 for ; Tue, 16 Jan 2024 07:11:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:CC:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=aRUIlpY2BLnCTzle8YJy5Z113257G3wTrB6XVMQej8c=; b=qci0lzZjfTXfrj 0wJygx8zD/xd3i57S0T8/FPHjAXHPkB+BpSix/BZOBLo0t2wlIP1UM9BM/wE/SFfZZfzo54Jtkc09 MRbHgAjb+iDGpI4nBGGLLRdlPjS+NA3im5LH/b5k0sOD4c6O4k1DFgoFC1KTOQEIxnCQ+Qp2lqBHR vQ48HJKalo29G/mHAul6XeEo1WV7KLmaGreQL9RCKxs/C/07q5+a/DWo30uPBw31Io8pUcxRpnW+9 ToqbQ0er7AEjLEPd9JYI/c6WILSINNQNCkn85TI9whIx5HFKVhKZuS1Lu9VtyXflcCvmutPAVT6Pr V8XoNIvV45TWNYXq8IxQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rPdat-00BAjp-0N; Tue, 16 Jan 2024 07:10:43 +0000 Received: from szxga03-in.huawei.com ([45.249.212.189]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rPdap-00BAi6-1W for linux-arm-kernel@lists.infradead.org; Tue, 16 Jan 2024 07:10:41 +0000 Received: from mail.maildlp.com (unknown [172.19.162.254]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4TDgB01k7TzNl59; Tue, 16 Jan 2024 15:09:44 +0800 (CST) Received: from dggpemm100001.china.huawei.com (unknown [7.185.36.93]) by mail.maildlp.com (Postfix) with ESMTPS id 4E00F1800A9; Tue, 16 Jan 2024 15:10:28 +0800 (CST) Received: from [10.174.177.243] (10.174.177.243) by dggpemm100001.china.huawei.com (7.185.36.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 16 Jan 2024 15:10:27 +0800 Message-ID: Date: Tue, 16 Jan 2024 15:10:26 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] ARM64: Dynamically allocate cpumasks and increase supported CPUs to 512 Content-Language: en-US To: "Russell King (Oracle)" , "Christoph Lameter (Ampere)" CC: Anshuman Khandual , , , , , Vanshidhar Konda , Jonathan Cameron , Catalin Marinas , Robin Murphy , Dave Kleikamp , Matteo Carlini , , References: <794a1211-630b-3ee5-55a3-c06f10df1490@linux.com> From: Kefeng Wang In-Reply-To: X-Originating-IP: [10.174.177.243] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemm100001.china.huawei.com (7.185.36.93) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240115_231039_688517_90A20A6C X-CRM114-Status: GOOD ( 14.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 help Use dynamic allocation for cpumask_var_t, instead of putting them on the stack. This is a bit more expensive, but avoids > >> >> config HOTPLUG_CPU >> bool "Support for hot-pluggable CPUs" > > Same here. > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel