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]
Message-ID: <48A084C8.6050204@qualcomm.com>
Date:	Mon, 11 Aug 2008 11:28:24 -0700
From:	Max Krasnyansky <maxk@...lcomm.com>
To:	Ingo Molnar <mingo@...e.hu>
CC:	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
	lizf@...fujitsu.com, jeff.chua.linux@...il.com,
	Glauber Costa <gcosta@...hat.com>
Subject: Re: [PATCH] Resurect proper handling of maxcpus= kernel option



Ingo Molnar wrote:
> * Max.Krasnyansky@...lcomm.com <Max.Krasnyansky@...lcomm.com> wrote:
> 
>> From: Max Krasnyansky <maxk@...lcomm.com>
>>
>> For some reason we had redundant parsers registered for maxcpus=. One 
>> in init/main.c and another in arch/x86/smpboot.c So I nuked the one in 
>> arch/x86.
>>
>> Also 64-bit kernels used to handle maxcpus= as documented in 
>> Documentation/cpu-hotplug.txt. CPUs with 'id > maxcpus' are 
>> initialized but not booted. 32-bit version for some reason ignored 
>> them even though all the infrastructure for booting them later is 
>> there.
>>
>> In the current mainline both 64 and 32 bit versions are broken. I'm 
>> too lazy to look through git history but I'm guessing it happened as 
>> part of the i386 and x86_64 unification.
> 
> yes in essence. 32-bit always had maxcpus as a hard restriction in the 
> number of CPUs. This got extended to 64-bit as well, via commit 
> 89b08200ad:
> 
>     x86: make x86_64 accept the max_cpus parameter
> 
> in v2.6.25. Two major kernel releases and nobody noticed - it's a rarely 
> used option.
> 
>> This patch restores the correct behaviour. I've tested x86_64 version 
>> on 4- and 8- way Core2 and 2-way Opteron based machines. Various 
>> config combinations SMP, !SMP, CPU_HOTPLUG, !CPU_HOTPLUG. Booted with 
>> maxcpus=1 and maxcpus=4, etc. Everything is working as expected.
>>
>> I cannot test 32-bit version (no 32-bit machines here).
> 
> This will need some test time on 32-bit as that is where this represents 
> a material change. ( albeit what matters most is the maxcpus=1 
> distinction - and for that nosmp can be used as well to turn off 
> multi-cpu support altogether. So we could do this in v2.6.27 as well. )

So far we got a couple of reports that it works as expected on 32 (both laptop
and server/desktop).

> Also, a quick grep shows that your patch will very likely break the 
> visws build:
> 
>  arch/x86/kernel/visws_quirks.c:extern unsigned int __cpuinitdata maxcpus;
>  arch/x86/kernel/visws_quirks.c:        if (ncpus > maxcpus)
>  arch/x86/kernel/visws_quirks.c:                ncpus = maxcpus;
> 
> could you please fix that?

Oh. I missed that one. Will fix.

Max



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