mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kefeng Wang <wangkefeng.wang@huawei.com>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>,
	"Christoph Lameter (Ampere)" <cl@linux.com>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <linux-mm@kvack.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>,
	<akpm@linux-foundation.org>, <yang@os.amperecomputing.com>
Subject: Re: [PATCH] ARM64: Dynamically allocate cpumasks and increase supported CPUs to 512
Date: Tue, 16 Jan 2024 15:10:26 +0800	[thread overview]
Message-ID: <f84f3e60-e71a-4ea4-8c9c-86fd915129a9@huawei.com> (raw)
In-Reply-To: <ZaVRlHpAOoNIiRiY@shell.armlinux.org.uk>



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.
> 

  reply	other threads:[~2024-01-16  7:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-15  0:05 Christoph Lameter (Ampere)
2024-01-15 15:39 ` Russell King (Oracle)
2024-01-16  7:10   ` Kefeng Wang [this message]
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)

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=f84f3e60-e71a-4ea4-8c9c-86fd915129a9@huawei.com \
    --to=wangkefeng.wang@huawei.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=Matteo.Carlini@arm.com \
    --cc=Valentin.Schneider@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=anshuman.khandual@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=cl@linux.com \
    --cc=dave.kleikamp@oracle.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux@armlinux.org.uk \
    --cc=robin.murphy@arm.com \
    --cc=vanshikonda@os.amperecomputing.com \
    --cc=yang@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

all inboxes | Powered by JetHome®