linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM64: Dynamically allocate cpumasks and increase supported CPUs to 512
@ 2023-12-15  0:05 Christoph Lameter (Ampere)
  2024-01-15 15:39 ` Russell King (Oracle)
  2024-01-15 23:59 ` Eric Mackay
  0 siblings, 2 replies; 13+ messages in thread
From: Christoph Lameter (Ampere) @ 2023-12-15  0:05 UTC (permalink / raw)
  To: Anshuman Khandual
  Cc: linux-arm-kernel, linux-kernel, linux-mm, Valentin.Schneider,
	Vanshidhar Konda, Jonathan Cameron, Catalin Marinas, Robin Murphy,
	Dave Kleikamp, Matteo Carlini, akpm, yang

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>

---

This was discussed earlier and this updated patch was proposed at 
https://lore.kernel.org/linux-arm-kernel/6a854175-5f89-c754-17b8-deda18447f1f@gentwo.org/T/


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"




^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-01-23 23:55 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-15  0:05 [PATCH] ARM64: Dynamically allocate cpumasks and increase supported CPUs to 512 Christoph Lameter (Ampere)
2024-01-15 15:39 ` Russell King (Oracle)
2024-01-16  7:10   ` Kefeng Wang
2024-01-16  9:28     ` Russell King (Oracle)
2024-01-16 13:08   ` Mark Rutland
2024-01-16 21:06     ` Eric Mackay
2024-01-17 19:59       ` Christoph Lameter (Ampere)
2024-01-15 23:59 ` Eric Mackay
2024-01-16 11:24   ` Russell King (Oracle)
2024-01-16 21:06     ` Eric Mackay
2024-01-17 20:01       ` Christoph Lameter (Ampere)
2024-01-18 17:53         ` Eric Mackay
2024-01-23 23:55           ` [PATCH v2] " Christoph Lameter (Ampere)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).