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: <86802c441001120059s46a2e93aydc76067960aa07e6@mail.gmail.com>
Date:	Tue, 12 Jan 2010 00:59:31 -0800
From:	Yinghai Lu <yinghai@...nel.org>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Suresh Siddha <suresh.b.siddha@...el.com>,
	"ananth@...ibm.com" <ananth@...ibm.com>,
	Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 2/4] x86: use dmi check to treat disabled cpus as 
	hotplug cpus.

On Mon, Jan 11, 2010 at 7:13 PM, Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
>
>
> On Mon, 11 Jan 2010, Yinghai Lu wrote:
>>
>> some systems that have disable cpus entries because same
>>   BIOS will support 2 sockets and 4 sockets and more at
>>   same time, BIOS just leave some disable entries, but
>>   those system do not support cpu hotplug. we don't need
>>   treat disabled_cpus as hotplug cpus.
>>
>> so we can make nr_cpu_ids smaller and save more space
>>   (pcpu data allocations), and could make some systems run
>>   with logical flat instead of physical flat apic mode
>
> .. but this one I detest.
>
> We can't play games that depend on us always filling in some DMI table
> correctly. Things need to "just work".
>
> So while 1/4 looks fine, 2/4 looks fundamentally unacceptable.
>
> Is the flat APIC mode really so important?
>
> I would suggest a few alternatives:
>
> Truly static:
>
>  - only use that flat apic mode when you _know_ that you absolutely will
>   never have more than 8 cpu's. Ie when CONFIG_NR_CPUS <= 8 (or, with
>   1/3, when nr_cpu_ids <= 8) and/or when <= 8 CPU's were detected, and
>   CPU hotplug is disabled entirely.
that is this patch try to do. but can not find out the system that does support
real hw support hotadd cpus.
>
> Slightly more intelligent:
>
>  - Look at the ACPI socket count, and hey, if it says it might have more
>   sockets - whether they are really hotplug or not, don't use flat mode,
>   because we simply don't know. But do _not_ do some kind of DMI table to
>   say one way or the other.

that acpi could lie, for example, some system share one BIOS between 2
socket/4 socket/8 sockets
model. and BIOS could have bunch disabled entries in MADT. or MPTABLE.

>
> And if it's _really_ important:
>
>  - if flat mode is so important that you want to enable it whenever
>   possible, what about enabling/disabling it dynamically at CPU hotplug
>   time? That does sound _very_ painful, but it's still better than having
>   to maintain some list of all systems that can ever hot-plug.

interesting, could be done.
init_apic_ldr is called even for physical flat on 64 bit.
could change apic on fly.

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