mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Dave Peterson <dsp@llnl.gov>
Cc: alan@lxorguk.ukuu.org.uk, linux-kernel@vger.kernel.org,
	bluesmoke-devel@lists.sourceforge.net, hch@lst.de
Subject: Re: [PATCH 1/15] EDAC: switch to kthread_ API
Date: Thu, 2 Mar 2006 18:30:35 -0800	[thread overview]
Message-ID: <20060302183035.6a15a1fc.akpm@osdl.org> (raw)
In-Reply-To: <200603021747.47515.dsp@llnl.gov>

Dave Peterson <dsp@llnl.gov> wrote:
>
>   		schedule_timeout((HZ * poll_msec) / 1000);
>   		try_to_freeze();
>  +		__set_current_state(TASK_RUNNING);

schedule() and schedule_timeout*() always return in state TASK_RUNNING, so
I'll take that out of there.

We might as well use schedule_timeout_interruptible(), too.  As a bonus, we
get to delete that spelling mistake ;)


--- devel/drivers/edac/edac_mc.c~edac-switch-to-kthread_-api-tidy	2006-03-02 18:27:56.000000000 -0800
+++ devel-akpm/drivers/edac/edac_mc.c	2006-03-02 18:27:56.000000000 -0800
@@ -2042,13 +2042,9 @@ static int edac_kernel_thread(void *arg)
 	while (!kthread_should_stop()) {
 		do_edac_check();
 
-		/* ensure we are interruptable */
-		set_current_state(TASK_INTERRUPTIBLE);
-
 		/* goto sleep for the interval */
-		schedule_timeout((HZ * poll_msec) / 1000);
+		schedule_timeout_interruptible((HZ * poll_msec) / 1000);
 		try_to_freeze();
-		__set_current_state(TASK_RUNNING);
 	}
 
 	return 0;
_


  reply	other threads:[~2006-03-03  2:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-03  1:47 Dave Peterson
2006-03-03  2:30 ` Andrew Morton [this message]
2006-03-03  9:16   ` Arjan van de Ven
2006-03-03 15:57 Doug Thompson
2006-03-03 23:20 ` Dave Peterson
2006-03-04  0:03   ` Andrew Morton

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=20060302183035.6a15a1fc.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=bluesmoke-devel@lists.sourceforge.net \
    --cc=dsp@llnl.gov \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®