From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.osdl.org (smtp.osdl.org [65.172.181.24]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (Client CN "smtp.osdl.org", Issuer "OSDL Hostmaster" (not verified)) by ozlabs.org (Postfix) with ESMTP id 7E2A3DDE2D for ; Tue, 6 Feb 2007 09:54:32 +1100 (EST) Date: Mon, 5 Feb 2007 14:54:25 -0800 From: Andrew Morton To: Johannes Berg Subject: Re: [PATCH 02/10] windfarm: dont die on suspend thread signal Message-Id: <20070205145425.5f6ecbb0.akpm@linux-foundation.org> In-Reply-To: <20070205185835.700233000@sipsolutions.net> References: <20070205183026.989209000@sipsolutions.net> <20070205185835.700233000@sipsolutions.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Cc: linuxppc-dev@ozlabs.org, Torrance , linux-pm@lists.osdl.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, 05 Feb 2007 19:30:29 +0100 Johannes Berg wrote: > When the windfarm thread gets a suspend signal it will die instead of > freezing. This fixes it. > > Signed-off-by: Johannes Berg > Cc: Andrew Morton > Cc: Benjamin Herrenschmidt > > --- > Please apply to -mm. > > --- mb-wireless.orig/drivers/macintosh/windfarm_core.c 2007-02-05 14:24:06.344526864 +0100 > +++ mb-wireless/drivers/macintosh/windfarm_core.c 2007-02-05 14:24:38.264526864 +0100 > @@ -94,8 +94,6 @@ static int wf_thread_func(void *data) > DBG("wf: thread started\n"); > > while(!kthread_should_stop()) { > - try_to_freeze(); > - > if (time_after_eq(jiffies, next)) { > wf_notify(WF_EVENT_TICK, NULL); > if (wf_overtemp) { > @@ -118,8 +116,8 @@ static int wf_thread_func(void *data) > if (delay <= HZ) > schedule_timeout_interruptible(delay); > > - /* there should be no signal, but oh well */ > - if (signal_pending(current)) { > + /* there should be no non-suspend signal, but oh well */ > + if (signal_pending(current) && !try_to_freeze()) { > printk(KERN_WARNING "windfarm: thread got sigl !\n"); > break; > } > > -- That sounds like a fairly irritating feature. Should we backport this into 2.6.20?