Re: the maxcpus= boot parameter broke somewhere along the line

From: Srivatsa S. Bhat
Date: Mon Apr 02 2012 - 10:33:05 EST


On 04/02/2012 07:35 PM, Jeff Moyer wrote:

> "Srivatsa S. Bhat" <srivatsa.bhat@xxxxxxxxxxxxxxxxxx> writes:
>
>> Looking at the mention of udev above, and considering the commit you bisected
>> to, I think it would be good to see whether someone is writing 1 to
>> /sys/device/system/cpu/cpu*/online and hence the cpus are getting hot-added
>> towards the end of boot. Maybe that sounds stupid, but worth a try :)
>>
>> So can you try the debug patch below? It applies on latest linux-3.3-rc6+
>
> Sorry it took me so long to get back to you. You're patch did, in fact,
> trigger:
>
> udev: starting version 147
> CPU 3 online initated from userspace
> SMP alternatives: switching to SMP code
> WARNING! power/level is deprecated; use power/control instead
> Booting Node 0 Processor 3 APIC 0x3
> NMI watchdog: enabled, takes one hw-pmu counter.
> CPU 1 online initated from userspace
> Booting Node 0 Processor 1 APIC 0x2
> NMI watchdog: enabled, takes one hw-pmu counter.
> CPU 2 online initated from userspace
> Booting Node 0 Processor 2 APIC 0x1
> NMI watchdog: enabled, takes one hw-pmu counter.
> CPU 1 online initated from userspace
> CPU 3 online initated from userspace
> CPU 2 online initated from userspace
>


Aha! Just like I thought!
So there is no kernel bug with respect to the maxcpus= boot parameter :-)

Regards,
Srivatsa S. Bhat

> Checking through udev rules, I found this in
> /lib/udev/rules.d/40-redhat.rules (this is a RHEL 6 install, btw):
>
> ACTION=="add", KERNEL=="cpu[0-9]*", RUN+="/bin/bash -c 'echo 1 > /sys/devices/system/cpu/%k/online'"
>
> So, what do you suppose is the right way to fix this?
>
> Cheers,
> Jeff
>
> Kay, you can read up on the rest of the thread here:
> https://lkml.org/lkml/2012/3/6/242
>


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