From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Paul Mackerras <paulus@samba.org>,
linuxppc-dev list <linuxppc-dev@ozlabs.org>
Subject: Re: [PATCH] windfarm: fix windfarm thread freezer interaction
Date: Tue, 23 Oct 2007 22:17:35 +0200 [thread overview]
Message-ID: <200710232217.35951.rjw@sisk.pl> (raw)
In-Reply-To: <1193142822.7733.3.camel@johannes.berg>
On Tuesday, 23 October 2007 14:33, Johannes Berg wrote:
> When I fixed the windfarm freezer interaction first in commit
> 1ed2ddf380e19dafeec2150ca709ef7f4a67cd21, an earlier patch than the one
> I came up with after comments was committed. This has come back to haunt
> us now because commit d5d8c5976d6adeddb8208c240460411e2198b393 changed
> the freezer to no long send signals. Fix it by removing the windfarm
> thread's signal logic and restoring the original try_to_freeze().
>
> We could simply revert 1ed2ddf380e19dafeec2150ca709ef7f4a67cd21 now
> but I feel that the assertion that no signal is delivered to the
> windfarm thread needs not be there.
>
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
> ---
> drivers/macintosh/windfarm_core.c | 10 +++-------
> 1 file changed, 3 insertions(+), 7 deletions(-)
>
> --- linux-2.6-git.orig/drivers/macintosh/windfarm_core.c 2007-10-23 14:23:02.406437623 +0200
> +++ linux-2.6-git/drivers/macintosh/windfarm_core.c 2007-10-23 14:25:28.745447695 +0200
> @@ -94,7 +94,9 @@ static int wf_thread_func(void *data)
> DBG("wf: thread started\n");
>
> set_freezable();
> - while(!kthread_should_stop()) {
> + while (!kthread_should_stop()) {
> + try_to_freeze();
> +
> if (time_after_eq(jiffies, next)) {
> wf_notify(WF_EVENT_TICK, NULL);
> if (wf_overtemp) {
> @@ -116,12 +118,6 @@ static int wf_thread_func(void *data)
> delay = next - jiffies;
> if (delay <= HZ)
> schedule_timeout_interruptible(delay);
> -
> - /* 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;
> - }
> }
>
> DBG("wf: thread stopped\n");
>
>
>
>
prev parent reply other threads:[~2007-10-23 20:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-23 12:33 [PATCH] windfarm: fix windfarm thread freezer interaction Johannes Berg
2007-10-23 20:17 ` Rafael J. Wysocki [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=200710232217.35951.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=johannes@sipsolutions.net \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.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).