[lkml]   [2008]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: <PING> Re: [patch x86/core] x86: allow number of additional hotplug CPUs to be set at compile time
On Sun, 5 Oct 2008, Andi Kleen wrote:
> >
> > Please lets get rid of all this.
> The result is that there's no way to override a BIOS now that
> doesn't declare the number of hotplug CPUs with the Linux hotplug
> extension.
> Completely trusting the BIOS seems like a bad idea.
> So I think you still need the command line parameter back, otherwise there's no
> way to override the BIOS.
> -Andi (who wished you guys would check with the original author
> before removing code you clearly don't understand)

Sigh, could you please start thinking first before you insult me ?

Chucks problem is that the BIOS advertises

1 present CPU and 1 disabled CPU

Now the current code does not switch to UP alternatives because the
check in alternatives.c is:

if (num_possible_cpus() == 1 ...

which evaluates to false, due to:

num_possible_cpus = num_processors + additional_cpus

where additional_cpus = disabled_cpus when no command line
parameter is given, i.e. the default behaviour of the kernel.

and where num_processors = num_present_cpus()

so in Chucks case num_possible_cpus() == 2

Your proposed solution is:

exporting additional_cpus and change the check to:

if ((num_possible_cpus() - additional_cpus) == 1 ...

This is simply stupid. We have the information already in
num_present_cpus() and that's the correct check in the alternatives

if (num_present_cpus() == 1 ...

This is not a question of trusting the BIOS:

If we can not trust present_cpu_map then additional_cpus does not help
at all.

additional_cpus is useless ballast.


tglx - who refrains from adding a nasty insulting comment

 \ /
  Last update: 2008-10-05 23:53    [W:0.038 / U:2.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site