Bjørn Mork <bj...@mork.no> writes: > Don Zickus <dzic...@redhat.com> writes: > >> What about the opposite cases? >> nmi_watchdog=1 >> echo 1 > /sys/devices/system/cpu/cpu1/online > > I don't see why not. But verifying it would be nice. I thought that it > would be a simple thing to test using qemu-kvm, but it seems that the > CPU hotplugging support there isn't quite ready. The guest just dies > with "Assertion `bus->allow_hotplug' failed." > > I'll go digging for alternatives, but if anyone else could verify this > then I'd appreciate it.
I just realized that you might not really want/need hotplugging, but just booting with some cores initially offline? That's easier to test at least: qmitest:~# cat /proc/cmdline initrd=/initrd.img.test root=/dev/sda1 ro console=tty0 console=ttyS0,9600n8 maxcpus=1 BOOT_IMAGE=/vmlinuz.test qmitest:~# grep . /sys/devices/system/cpu/o*line /sys/devices/system/cpu/offline:1-3 /sys/devices/system/cpu/online:0 qmitest:~# grep . /sys/devices/system/cpu/cpu?/online /sys/devices/system/cpu/cpu1/online:0 /sys/devices/system/cpu/cpu2/online:0 /sys/devices/system/cpu/cpu3/online:0 qmitest:~# grep . /sys/devices/system/cpu/o*line /sys/devices/system/cpu/offline:1-3 /sys/devices/system/cpu/online:0 qmitest:~# grep . /proc/sys/kernel/nmi_watchdog 1 qmitest:~# echo 1 > /sys/devices/system/cpu/cpu1/online qmitest:~# echo 1 > /sys/devices/system/cpu/cpu2/online qmitest:~# grep . /sys/devices/system/cpu/cpu?/online /sys/devices/system/cpu/cpu1/online:1 /sys/devices/system/cpu/cpu2/online:1 /sys/devices/system/cpu/cpu3/online:0 No problem observed. As expected. Bjørn -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/