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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 11 Dec 2008 10:19:46 -0800
From:	Mike Travis <travis@....com>
To:	Heiko Carstens <heiko.carstens@...ibm.com>
CC:	Ingo Molnar <mingo@...hat.com>,
	Rusty Russell <rusty@...tcorp.com.au>,
	"H. Peter Anvin" <hpa@...or.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/4] cpumask: use maxcpus=NUM to extend the cpu limit
 as well as restrict the limit

Heiko Carstens wrote:
> On Thu, Dec 11, 2008 at 03:28:09AM -0800, Mike Travis wrote:
>> Impact: allow adding additional cpus.
>>
>> Use maxcpus=NUM kernel parameter to extend the number of possible cpus as well
>> as (currently) limit them.  Any cpus >= number of present cpus will disabled.
>>
>> The ability to HOTPLUG ON cpus that are "possible" but not "present" is
>> dealt with in a later patch.
> 
> Hm.. documentation/kernel-parameters.txt says:
> 
> 	maxcpus=	[SMP] Maximum number of processors that an SMP kernel
> 			should make use of.  maxcpus=n : n >= 0 limits the
> 			kernel to using 'n' processors.	 n=0 is a special case,
> 			it is equivalent to "nosmp", which also disables
> 			the IO APIC.
> 
> but documentation/cpu-hotplug.txt says:
> 
> maxcpus=n    Restrict boot time cpus to n. Say if you have 4 cpus, using
> 	     maxcpus=2 will only boot 2. You can choose to bring the
> 	     other cpus later online, read FAQ's for more info.
> 
> It used to be (implementation wise) that maxcpus doesn't influence the number
> of possible cpus but just indicated how many cpus were brought online at startup
> of the kernel. Which is what cpu-hotplug.txt describes.
> 
> Other present cpus would appear offline and could be brought online later.
> 
> For s390 I added the possible_cpus kernel parameter back then, since my
> understanding back then was that maxcpus doesn't and shouldn't influence the
> number of possible cpus:
> 
> possible_cpus=n		[s390 only] use this to set hotpluggable cpus.
> 			This option sets possible_cpus bits in
> 			cpu_possible_map. Thus keeping the numbers of bits set
> 			constant even if the machine gets rebooted.
> 
> Dunno... it all looks like a mess ;)

Hmm, I hadn't noticed that.  For a while the X86 devel kernel had an
"additional_cpus=n" parameter, which was also a bit confusing.  Say you
wanted, 64 total, you had to give the increment over how many you already
had [e.g., (want)64 - (have)16  = (additional_cpus=)48.]

I just figured that re-using the same kernel parameter was better than adding
another.  But I'm willing to go either way.

Btw, I did alter the Documentation/kernel-parameters.txt file:

        maxcpus=        [SMP] Maximum number of processors that an SMP kernel
                        should make use of.  maxcpus=n : n >= 0 limits the
                        kernel to using 'n' processors.  n=0 is a special case,
                        it is equivalent to "nosmp", which also disables
                        the IO APIC.  On [X86] maxcpus can also be used to
                        extend the number of possible cpus to overcome ACPI
                        tables that do not indicate disabled cpus, as well as
                        allow for additional cpus to be HOT PLUGGED in.
                        Format: <0-NR_CPUS>

In modifying the code, I could not find any arch-specific instances and the only
general case was in the 3 references in init/main.c, so I figured it was pretty
safe to use.

Thanks,
Mike
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ