Received: by 2002:a05:7412:8d09:b0:fa:4c10:6cad with SMTP id bj9csp284935rdb; Mon, 15 Jan 2024 23:10:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IGeno92PWTeFkk+Dek9FqVSiF+F+aNi1FUQw69fMtZVjrKUJ1LrOUfuEheMKxZn+w+PpmFh X-Received: by 2002:a05:6808:ec3:b0:3bd:53b3:19c5 with SMTP id q3-20020a0568080ec300b003bd53b319c5mr6730769oiv.61.1705389041024; Mon, 15 Jan 2024 23:10:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705389040; cv=none; d=google.com; s=arc-20160816; b=kY3350ujN7Fu879bUPs+Ef7ic/qDyRMpfv4ndhdG4oDs/5A6A1J55KjH9P8n8msBvo +fg1FirlLZRHo27vwZBBfk7GOErg5/esbvAix+5gM6ORN1Dosk7dus8nuNqCHHopMOOn qHFYNOJiX+p3cJ2HMTZh/4uDE0SYsVKmUDnSNaI95A4j2IObXOdcbK3Q/ydmVVZXqE33 palqASQQv1YfkcWVHdwSM9Z0mqKI9UiOsGafuUzSdUYTWdj6FS81HN2/p2ISo8WadlYH xt68+U+76ZgHQphXyo0PKq+o3SYjKBoeP0nMSRGlnOdHl1LxcxLKB0xzcpibyH+az+mR TlDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=piyL3qZCdYQ3vvhaHADxR8lGqmbYlmOc2AH3GyafDTs=; fh=s/L/aFUvG3EauVXUz9tlEcA9dshaRch64LVcgdV7BBw=; b=ovkA4uk38Gy3lSaX6eH9u78GffvxKM7ByrD/mH6vTU/uosENvOJMWDC5xIXuaKA6Ou LG0v6wVBL+6z9wgoaGrr66FmNLYTPUWnptKffhgAOh2flBIOuQsoPnUm6IIn3l/IDc0w zX/53rT56mOe8fGRtF3xOvZsfeey0s6SpanHMZ/o19BYt5fFRdOPq6uQDuahrEW1poxZ eECuCMmrz1SkFK9WxS21KAXKP4XvNxnTSpcT1hCjG2FQRuiPseoH2c3qsqTJsEt2tIxq rMjaz3LzQrgu0DO3CKwnLt3dTn2cifVfJATQuIVevdXS67cAcXw0XWqD4606SGQGHhku kteQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-27056-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-27056-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id c17-20020a05622a059100b00429836a9ca8si9559700qtb.453.2024.01.15.23.10.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 23:10:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-27056-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-27056-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-27056-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id BDE6B1C22786 for ; Tue, 16 Jan 2024 07:10:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8688410A26; Tue, 16 Jan 2024 07:10:34 +0000 (UTC) Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) (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 4A47310A12 for ; Tue, 16 Jan 2024 07:10:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemm100001.china.huawei.com (7.185.36.93) 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. >