Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761115AbXELUMs (ORCPT ); Sat, 12 May 2007 16:12:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760057AbXELUMe (ORCPT ); Sat, 12 May 2007 16:12:34 -0400 Received: from smtp1.linux-foundation.org ([65.172.181.25]:39325 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759022AbXELUMd (ORCPT ); Sat, 12 May 2007 16:12:33 -0400 Date: Sat, 12 May 2007 13:11:34 -0700 (PDT) From: Linus Torvalds To: Gautham R Shenoy cc: "Rafael J. Wysocki" , Pavel Machek , Oleg Nesterov , Andrew Morton , LKML Subject: Re: [RFD] Freezing of kernel threads In-Reply-To: Message-ID: References: <200705122017.32792.rjw@sisk.pl> <20070512193609.GA31426@in.ibm.com> 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: 1030 Lines: 25 On Sat, 12 May 2007, Linus Torvalds wrote: > > - make the rule be that you cannot sleep in the above macro, and make the > rule be that CPU hotplug uses the same mechanisms that module unload > already does! Side note: we obviously already do the stop_machine_run thing for CPU down, so doing it for CPU bringup too would seem to just be a good thing. And it means that the locking for CPU's disappearing is the same as the locking rules for CPU's appearing: you just want to make sure to disable preemption (which you already have to do, to make the "CPU went away" case work out). So how about just making sure "__cpu_up()" gets called with the same stop_machine_run() logic? Maybe it's not *quite* a one-liner change, but it should come fairly close... Linus - 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/