lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 16 Jan 2024 09:28:46 +0000
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Kefeng Wang <wangkefeng.wang@...wei.com>
Cc: "Christoph Lameter (Ampere)" <cl@...ux.com>,
	Anshuman Khandual <anshuman.khandual@....com>,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org, Valentin.Schneider@....com,
	Vanshidhar Konda <vanshikonda@...amperecomputing.com>,
	Jonathan Cameron <Jonathan.Cameron@...wei.com>,
	Catalin Marinas <catalin.marinas@....com>,
	Robin Murphy <robin.murphy@....com>,
	Dave Kleikamp <dave.kleikamp@...cle.com>,
	Matteo Carlini <Matteo.Carlini@....com>, akpm@...ux-foundation.org,
	yang@...amperecomputing.com
Subject: Re: [PATCH] ARM64: Dynamically allocate cpumasks and increase
 supported CPUs to 512

On Tue, Jan 16, 2024 at 03:10:26PM +0800, Kefeng Wang wrote:
> 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

Please. No.

There is no point in defining a default of n. The default default is n.
Therefore, specifying a default of n is utterly redundant as the option
will still default to n and just adds clutter to Kconfig files.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ