From: Johannes Berg <johannes@sipsolutions.net>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev list <linuxppc-dev@ozlabs.org>,
linux-pm <linux-pm@lists.osdl.org>
Subject: [PATCH] windfarm: proper try_to_freeze / signal_pending handling
Date: Fri, 23 Jun 2006 12:05:44 +0200 [thread overview]
Message-ID: <1151057144.7608.14.camel@localhost> (raw)
In-Reply-To: <1150847482.16662.13.camel@johannes>
This seems to work for me:
---
This patch makes windfarm handle signal_pending()/try_to_freeze()
better.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
--- linux-2.6-git.orig/drivers/macintosh/windfarm_core.c 2006-06-22 16:41:18.182172154 +0200
+++ linux-2.6-git/drivers/macintosh/windfarm_core.c 2006-06-22 16:42:49.045354378 +0200
@@ -93,8 +93,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) {
@@ -117,8 +115,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;
}
prev parent reply other threads:[~2006-06-23 14:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-20 23:51 windfarm got signal Johannes Berg
2006-06-22 6:02 ` Benjamin Herrenschmidt
2006-06-22 11:03 ` [linux-pm] " Rafael J. Wysocki
2006-06-22 11:13 ` Johannes Berg
2006-06-22 11:34 ` Johannes Berg
2006-06-22 12:33 ` Nigel Cunningham
2006-06-27 7:44 ` Benjamin Herrenschmidt
2006-06-27 18:17 ` [PATCH] fix windfarm core thread wrt. signal handling Johannes Berg
2006-06-27 22:07 ` Benjamin Herrenschmidt
2006-06-22 13:12 ` [linux-pm] windfarm got signal Pavel Machek
2006-06-23 10:05 ` Johannes Berg [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1151057144.7608.14.camel@localhost \
--to=johannes@sipsolutions.net \
--cc=benh@kernel.crashing.org \
--cc=linux-pm@lists.osdl.org \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).