Re: [PATCH] x86, apic: Do not increment disabled_cpus from generic_processor_info.

Cyrill Gorcunov
2011-01-09T18:39:05Z

On 01/09/2011 07:57 PM, Rakib Mullick wrote:
> On Sun, Jan 9, 2011 at 3:39 PM, Ingo Molnar <mingo@elte.hu> wrote:
>>
>> Hm, what effects does this have in practice? smpboot.c uses disabled_cpus as a value
>> to calculate limits - why has this bug not caused some misbehavior somewhere? (or if
>> it has caused misbehavior, what is that?)
>
> If I'm not wrong, smpboot.c tries to get the possible cpu map by
> calculating disabled_cpus and num_processors. When we pass nr_cpus=n,
> which is less than no. of CPUs available, we can't put more CPUs
> online. So, no of cpu we detect at startup is okay. Or am I missing
> anything?
>
> thanks,
> rakib
>

When nr_cpus=n passed from command line and there is N > n physical cpu
present we *still* have to increment disabled_cpus in generic_processor_info
because:

1) We're priting out the number of cpu which is disabled
2) total_cpus become inconsistent

and while (1) is not that important, total_cpus _is_ important (it
is used to print out offlined cpus).

So I still fail to see why we need to drop the former increment in
first place.
--
Cyrill