From: "Christoph Lameter (Ampere)" <cl@linux.com>
To: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Valentin.Schneider@arm.com,
Vanshidhar Konda <vanshikonda@os.amperecomputing.com>,
Jonathan Cameron <Jonathan.Cameron@Huawei.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Robin Murphy <robin.murphy@arm.com>,
Dave Kleikamp <dave.kleikamp@oracle.com>,
Matteo Carlini <Matteo.Carlini@arm.com>
Subject: [PATCH] ARM64: Dynamicaly allocate cpumasks and increase supported CPUs to 512 (was: CONFIG_MAXSMP to allow up to 512 cpus)
Date: Mon, 4 Dec 2023 10:49:24 -0800 (PST) [thread overview]
Message-ID: <8c21b27a-fbab-890d-40d2-ba460b0e3900@linux.com> (raw)
In-Reply-To: <01d7531b-3d5c-989d-58ac-60861249fd3e@linux.com>
New version of the patch after feedback from Catalin:
From: Christoph Lameter (Ampere) <cl@linux.com>
Subject: [PATCH] ARM64: Dynamicaly allocate cpumasks and increase supported CPUs to 512
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.
Signed-off-by: Christoph Lameter (Ampere) <cl@linux.com>
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"
prev parent reply other threads:[~2023-12-04 18:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-21 1:04 [PATCH ARM64]: Introduce CONFIG_MAXSMP to allow up to 512 cpus Christoph Lameter (Ampere)
2023-11-23 19:33 ` Catalin Marinas
2023-11-27 19:58 ` Christoph Lameter (Ampere)
2023-11-28 6:40 ` Anshuman Khandual
2023-11-28 18:02 ` Christoph Lameter (Ampere)
2023-12-04 18:49 ` Christoph Lameter (Ampere) [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8c21b27a-fbab-890d-40d2-ba460b0e3900@linux.com \
--to=cl@linux.com \
--cc=Jonathan.Cameron@Huawei.com \
--cc=Matteo.Carlini@arm.com \
--cc=Valentin.Schneider@arm.com \
--cc=anshuman.khandual@arm.com \
--cc=catalin.marinas@arm.com \
--cc=dave.kleikamp@oracle.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=vanshikonda@os.amperecomputing.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox