Re: [RFC PATCH 2/4] x86: use dmi check to treat disabled cpus as hotplug cpus.

From: Linus Torvalds
Date: Tue Jan 12 2010 - 10:20:53 EST



On Tue, 12 Jan 2010, Yinghai Lu wrote:
> >
> > 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.

That's fine. So it would mean that sometimes we'd use non-flat mode even
if we strictly didn't need to (because we _think_ that there could be four
sockets even though there is only one, and three are disabled). But things
would still work without any special cases.

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

Quite frankly, while I suggested it as an option, I really suspect it's
too much complexity for very little real gain.

Say that you have only four cores, but the kernel decided that it can't
use logical flat APIC mode because it sees three disabled sockets and
thinks "ok, we may end up with a total of 16 cores if those sockets are
hotplugged". Is that such a disaster?

Realistically, do we really care? Do you have performance numbers that say
that logical flat mode is so important that we really _really_ want to use
it, even at the cost of nasty run-time complexity with having to
re-program the APIC setup entirely when going from 8->9 CPU's?

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