Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750868AbVKWOv1 (ORCPT ); Wed, 23 Nov 2005 09:51:27 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750874AbVKWOv1 (ORCPT ); Wed, 23 Nov 2005 09:51:27 -0500 Received: from ns2.suse.de ([195.135.220.15]:32734 "EHLO mx2.suse.de") by vger.kernel.org with ESMTP id S1750862AbVKWOv0 (ORCPT ); Wed, 23 Nov 2005 09:51:26 -0500 To: Gerd Knorr Cc: Linus Torvalds , Dave Jones , Zachary Amsden , Pavel Machek , Andrew Morton , Linux Kernel Mailing List , "H. Peter Anvin" , Zwane Mwaikambo , Pratap Subrahmanyam , Christopher Li , "Eric W. Biederman" , Ingo Molnar Subject: Re: [patch] SMP alternatives References: <200511100032.jAA0WgUq027712@zach-dev.vmware.com> <20051111103605.GC27805@elf.ucw.cz> <4374F2D5.7010106@vmware.com> <4374FB89.6000304@vmware.com> <20051113074241.GA29796@redhat.com> <4378A7F3.9070704@suse.de> <4379ECC1.20005@suse.de> <437A0649.7010702@suse.de> <437B5A83.8090808@suse.de> <438359D7.7090308@suse.de> From: Andi Kleen Date: 23 Nov 2005 12:17:58 -0700 In-Reply-To: <438359D7.7090308@suse.de> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1431 Lines: 31 Gerd Knorr writes: > 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. 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. This would keep it much simpler and simplicity is very important with such code because otherwise the testing of all the corner cases will kill you. BTW the existing mechanism already works fine for modules too. > + /* 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) -Andi - 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/