linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nigel Cunningham <ncunningham@linuxmail.org>
To: linux-pm@lists.osdl.org
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
	linuxppc-dev list <linuxppc-dev@ozlabs.org>,
	Johannes Berg <johannes@sipsolutions.net>
Subject: Re: [linux-pm] windfarm got signal
Date: Thu, 22 Jun 2006 22:33:26 +1000	[thread overview]
Message-ID: <200606222233.32609.ncunningham@linuxmail.org> (raw)
In-Reply-To: <1150976092.16258.33.camel@johannes>

[-- Attachment #1: Type: text/plain, Size: 1028 bytes --]

Hi.

On Thursday 22 June 2006 21:34, Johannes Berg wrote:
> On Thu, 2006-06-22 at 13:13 +0200, Johannes Berg wrote:
> > Thanks, I'll look and submit a patch. It does try_to_freeze() but also
> > checks for pending signals.
>
> Ah. The code is just in the wrong order:
> while (!kthread_should_stop()) {
>   try_to_freeze();
>   ...
>   schedule_timeout_interruptible(...);
>   if (signal_pending())
>     break;
> }
>
> Would it be correct to just move the try_to_freeze() before the
> signal_pending() statement?

Hmm. Will kthread_should_stop() be set if it should really exit? If so, 
perhaps you can just remove the signal_pending() check. Otherwise, you'd want 
to change the signal_pending() test to something like the "if 
(signal_pending() && !try_to_freeze())" to avoid any possibility of a race. 
(In this case, you should be able to remove the try_to_freeze() from above).

Regards,

Nigel
-- 
Nigel, Michelle and Alisdair Cunningham
5 Mitchell Street
Cobden 3266
Victoria, Australia

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2006-06-22 12:38 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 [this message]
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 ` [PATCH] windfarm: proper try_to_freeze / signal_pending handling Johannes Berg

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=200606222233.32609.ncunningham@linuxmail.org \
    --to=ncunningham@linuxmail.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-pm@lists.osdl.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=rjw@sisk.pl \
    /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).