lkml.org 
[lkml]   [2005]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] SMP alternatives
Andi Kleen wrote:
> Gerd Knorr <kraxel@suse.de> writes:
>
>> 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.
>
> This looks like total overkill to me. Who needs to optimize
> CPU hotplug this way? If you really need this just do it
> at boot time with the existing mechanisms.

Sure, for real hardware doing that at boot time is be perfectly fine.
In a virtual environment it's very useful to be able to plug in one more
virtual CPU on demand without rebooting though. The patch isn't very
useful alone, it's more one step on the road of getting the xen bits
merged mainline.

>> + /* Paranoia */
>> + asm volatile ("jmp 1f\n1:");
>> + mb();
>
> That would be totally obsolete 386 era paranoia. If anything then use
> a CLFLUSH (but not available on all x86s)

Ok, dropped. I've just copyed that from the original, pretty ugly xen
patch.

cheers,

Gerd
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-11-23 16:31    [W:0.738 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site