Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp3210213rdb; Tue, 6 Feb 2024 10:10:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IHhhtO60DQSq+WAQAwLj1XqCFupIO29IoButsF/tdA2NcMwzo8zqDRnuv6poHdvU++LjaaL X-Received: by 2002:a05:6358:7e42:b0:176:6270:8cb6 with SMTP id p2-20020a0563587e4200b0017662708cb6mr325155rwm.25.1707243014926; Tue, 06 Feb 2024 10:10:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707243014; cv=pass; d=google.com; s=arc-20160816; b=Nj7ESYV5OVllubqRJSD7ortBxnEGZ3kJKmV1UuVhXJSmUjuZ4CSXkIHzkB84P4S1E6 K0ruwt3ocHunaPv5UsdOWDjbqwhNmgWkaYxkKBIVnWmOZEo74TfXrR1kw7Gi6pyZ6xmV X+QEZQgP40o6qwLsF+/asC4ZCIBHKrLoc/tB4C08DoFcB0KacO9vE3KU2wOl8IyBUkP2 ZWHRZuG0lTQRSuz4TSI+vj9g5l6oJ+LbY8GaxNVR48j6uSbJB53bhqqonQvtdTW5RTZd 5Bk5MuIE2BRZJB3+X2zTXahpZOILShqeCZdgV7iVA8xE0orf+vOQ07k16e2758hRcHbO s6kA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:subject:cc:to:from:date:dkim-signature; bh=yymB7BO8tU80FrwCgGeJ6JKl5QinB238RD5EgM+7O24=; fh=eMpKh0x6XjKNcDqnFotBqfanJkDJF1uSZ7uWrLdkWJs=; b=bQ3J85+12R/oGwQYRXt4f6jBC6xKlmy2fr+f6eHO96ZYn5msyvNECck72zqO6XpwV9 SvQwzY9gspu2SRsNL/Hi9gyPQUR4BlxCCXyCb1dVQXU3/H3XV6WMf+B65uLeNEzl7wMt MHfBn34YesOIUAfY4IoPfPRWkI32zSyqVOaGjfEKKsbneSgGFZxF88UZRWFzKt5MGv6c hMdfCsS0tteyfSUH4PsCFCn4SnCwIp/yBR4XxP6aqZpZwYK0xOenYJ732h9trvs24PAT 3d829VSQSDuqI1YGPXl5FvEyiaYBUZzebqWWkI7j9nZngqx/yQgiukNrxHY/IXnzp7uw o+Ug==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=neutral (invalid public key) header.i=@gentwo.org header.s=default header.b=dHBKmQ4B; arc=pass (i=1 spf=pass spfdomain=gentwo.org dmarc=pass fromdomain=gentwo.org); spf=pass (google.com: domain of linux-kernel+bounces-55441-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55441-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gentwo.org X-Forwarded-Encrypted: i=1; AJvYcCVJt/nItaqzdtbFxOUTCrmXZNvsv+s0yc62WKTdP6IQvDVnX+flkIqh4GH9MAaaGnF/pxHUnsO020ffvzNX7w4ta19lhTi55U+sgaOAIA== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 15-20020a63144f000000b005c66368cfb2si1967957pgu.451.2024.02.06.10.10.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 10:10:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55441-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=neutral (invalid public key) header.i=@gentwo.org header.s=default header.b=dHBKmQ4B; arc=pass (i=1 spf=pass spfdomain=gentwo.org dmarc=pass fromdomain=gentwo.org); spf=pass (google.com: domain of linux-kernel+bounces-55441-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55441-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gentwo.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 8E85B284965 for ; Tue, 6 Feb 2024 18:10:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4B7AC1078B; Tue, 6 Feb 2024 18:10:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=permerror (0-bit key) header.d=gentwo.org header.i=@gentwo.org header.b="dHBKmQ4B" Received: from gentwo.org (gentwo.org [62.72.0.81]) (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 D8A0E134A5 for ; Tue, 6 Feb 2024 18:10:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.72.0.81 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707243007; cv=none; b=n2P2dec922svhenIoMJuiTmvi459Wa2E5PZeZe5NoheOK+dWGcMMK5XbA89Bjw/8DULAo+NRRQ4pHdTWEuR4vuHu4HyvG8nm+9/ymTQ6YW1q6aFtExgNuMOk4w+NYrQoREGpr8srAYypOtbYMGVLtdNnrrbOdMSleffpFhOekBk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707243007; c=relaxed/simple; bh=Kxq4sAvN5Fs2sIsPglHruFBuErxB15QsWcASPc5lT0Q=; h=Date:From:To:cc:Subject:Message-ID:MIME-Version:Content-Type; b=fZdIgBNa0PbKStpvhaD1v+f8RIFU1NH+nyzIan7lMuoyUqKpkJPT87WkDzg365OnHPPK7YMwnx/3A4MSsor17LA7Hz4PBJGS0W5kdnmJDYxOwZNQuF0A4goKRxk/OCvqo7SJQJesVZ8htr/OowVvlsxLZZKHk0Kokv9P1z0fQks= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gentwo.org; spf=pass smtp.mailfrom=gentwo.org; dkim=permerror (0-bit key) header.d=gentwo.org header.i=@gentwo.org header.b=dHBKmQ4B; arc=none smtp.client-ip=62.72.0.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gentwo.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gentwo.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gentwo.org; s=default; t=1707242999; bh=Kxq4sAvN5Fs2sIsPglHruFBuErxB15QsWcASPc5lT0Q=; h=Date:From:To:cc:Subject:From; b=dHBKmQ4BHy52GP3uyL/6OewvtDCvQAl73DQsCoM3ERD4Zt3W7zQRZ27bJRXFJI5Eg VxeVaHDzouRpY2ewEI0xXRnrTP9FzGyA3S9hx4GEjc8KRBozUMvFtnso8CTQ7VpZUK K1zSEx7Q4+RYHO7sR23yOjTRfUNo68EIjhXI8hDx/V20gjUG2bDjM5L6zApYfo//pA k5DaKUu0lrD3RJCqSgFZ6M4/YnoHVWiXDLoNiSbV8QE1EfaUie4Q8t1cLskKuicRY2 js6kn6JI9WFsohDyHKW8tdZn3p8PMGxVV6m2Q5upOLldNy113gSO/vRCZA4ENtK8S5 yAs6BEbzEfbBA== Received: by gentwo.org (Postfix, from userid 1003) id 8475940A93; Tue, 6 Feb 2024 10:09:59 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id 83AC940788; Tue, 6 Feb 2024 10:09:59 -0800 (PST) Date: Tue, 6 Feb 2024 10:09:59 -0800 (PST) From: "Christoph Lameter (Ampere)" To: catalin.marinas@arm.com, Will Deacon cc: Jonathan.Cameron@huawei.com, Matteo.Carlini@arm.com, Valentin.Schneider@arm.com, akpm@linux-foundation.org, anshuman.khandual@arm.com, Eric Mackay , dave.kleikamp@oracle.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux@armlinux.org.uk, robin.murphy@arm.com, vanshikonda@os.amperecomputing.com, yang@os.amperecomputing.com Subject: [PATCH REPOST v2] ARM64: Dynamically allocate cpumasks and increase supported CPUs to 512 Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII Can we get this merged for 6.9? The patch has been around for awhile now. Ampere Computing develops high end ARM processor that support an ever increasing number of processors. The default 256 processors are not enough for our newer products. The default is used by distros and therefore our customers cannot use distro kernels because the number of processors is not supported. One of the objections against earlier patches to increase the limit was that the memory use becomes too high. There is a feature called CPUMASK_OFFSTACK that configures the cpumasks in the kernel to be dynamically allocated. This was used in the X86 architecture in the past to enable support for larger CPU configurations up to 8k cpus. With that is becomes possible to dynamically size the allocation of the cpu bitmaps depending on the quantity of processors detected on bootup. This patch enables that logic if more than 256 processors are configured and increases the default to 512 processors. Further increases may be needed if ARM processor vendors start supporting more processors. Given the current inflationary trends in core counts from multiple processor manufacturers this may occur. Tested-by: Eric Mackay Signed-off-by: Christoph Lameter (Ampere) --- Original post: https://www.spinics.net/lists/linux-mm/msg369701.html V1->V2 - Keep quotation marks - Remove whiltespace damage - Add tested by 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 - 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 config HOTPLUG_CPU bool "Support for hot-pluggable CPUs" _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel