Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S265626AbUATRuP (ORCPT ); Tue, 20 Jan 2004 12:50:15 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S265630AbUATRuP (ORCPT ); Tue, 20 Jan 2004 12:50:15 -0500 Received: from smtp2.Stanford.EDU ([171.67.16.116]:63420 "EHLO smtp2.Stanford.EDU") by vger.kernel.org with ESMTP id S265626AbUATRuH (ORCPT ); Tue, 20 Jan 2004 12:50:07 -0500 Message-ID: <400D6A33.6020108@myrealbox.com> Date: Tue, 20 Jan 2004 09:49:39 -0800 From: Andy Lutomirski User-Agent: Mozilla Thunderbird 0.5a (Windows/20040113) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tim Hockin CC: Nick Piggin , Rusty Russell , vatsa@in.ibm.com, lhcs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: CPU Hotplug: Hotplug Script And SIGPWR References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1553 Lines: 35 Tim Hockin wrote: > On Tue, Jan 20, 2004 at 05:43:59PM +1100, Nick Piggin wrote: > >>>I think the sanest thing for a CPU removal is to migrate everything off the >>>processor in question, move unrunnable tasks into TASK_UNRUNNABLE state, >>>then notify /sbin/hotplug. The hotplug script can then find and handle the >>>unrunnable tasks. No SIGPWR grossness needed. >>> >> >>Seems less robust and more ad hoc than SIGPWR, however. > > > Disagree. SIGPWR will kill any process that doesn't catch it. That's > policy. It seems more robust to let the hotplug script decide what to do. > If it wants to kill each unrunnable task with SIGPWR, it can. But if it > wants to let them live, it can. This seems like a problem that a lot of power-management issues have. (At some point, linux may want to suspend itself after inactivity. Both RT tasks and some interactive tasks may want to supress that.) Why not add a SIGPM signal, which is only sent if handles, and which indicates that PM event is happening. Give usermode some method of responding to it (e.g. handler returns a value, or a new syscall), and let /sbin/hotplug handle events for tasks that either ignore the signal or responded that they were uninterested. This seems be close to optimal for every case I can think of. --Andy - 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/