Gerd Knorr wrote: > Gerd Knorr wrote: > >> i.e. something like this (as basic idea, patch is far away from doing >> anything useful ...)? > > Adapting $subject to the actual topic, so other lkml readers can catch > up ;) > > Ok, here new version of the SMP alternatives patch. It features: Now, some days hacking & debugging and kernel crashing later I have something more than just proof-of-concept ;) Modules are supported now, fully modularized distro kernel works fine with it. If you have a kernel with HOTPLUG_CPU compiled you can shutdown the second CPU of your dual-processor system via sysfs (echo 0 > /sys/devices/system/cpu/cpu1/online) and watch the kernel switch over to UP code without lock-prefixed instructions and simplified spinlocks, then power up the second CPU again (echo 1 > /sys/...) and watch it patching back in the SMP locking. For testing & benchmarking purposes I've put also in two (temporary) sysrq's to switch between UP and SMP bits without booting/shutting down the second CPU. That one breaks non-i386 builds which are trivially fixable by just dropping the drivers/char/sysrq.c changes ;) enjoy, Gerd