mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nish Aravamudan <nish.aravamudan@gmail.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: PATCH: EDAC, core EDAC support code
Date: Sat, 15 Oct 2005 20:05:13 -0700	[thread overview]
Message-ID: <29495f1d0510152005s3643dc02ub6a0f805c6197332@mail.gmail.com> (raw)
In-Reply-To: <1129403217.17923.22.camel@localhost.localdomain>

On 10/15/05, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> This is a subset of the bluesmoke project core code, stripped of the NMI
> work which isn't ready to merge and some of the "interesting" proc
> functionality that needs reworking or just has no place in kernel. It
> requires no core kernel changes except the added scrub functions already
> posted.
>
> The goal is to merge further functionality only after the core code is
> accepted and proven in the base kernel, and only at the point the
> upstream extras are really ready to merge.
>
> Alan
>
> Signed-off-by: Alan Cox <alan@redhat.com>
>
>
> diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.14-rc2-mm1/drivers/edac/edac_mc.c linux-2.6.14-rc2-mm1/drivers/edac/edac_mc.c
> --- linux.vanilla-2.6.14-rc2-mm1/drivers/edac/edac_mc.c 1970-01-01 01:00:00.000000000 +0100
> +++ linux-2.6.14-rc2-mm1/drivers/edac/edac_mc.c 2005-10-14 18:26:12.000000000 +0100

<snip>

> +static int poll_msec = 1000;

<snip>

> +static int edac_kernel_thread(void *arg)
> +{
> +       struct bs_thread_info *thread = (struct bs_thread_info *) arg;
> +
> +       /* detach thread */
> +       daemonize(thread->name);
> +
> +       current->exit_signal = SIGCHLD;
> +       allow_signal(SIGKILL);
> +       thread->task = current;
> +
> +       /* indicate to starting task we have started */
> +       complete(thread->event);
> +
> +       /* loop forever, until we are told to stop */
> +       while(thread->run != NULL) {
> +               void (*run)(unsigned long dummy);
> +
> +               /* call the function to check the memory controllers */
> +               run = thread->run;
> +               if(run)
> +                       run(thread->dummy);
> +
> +               if(signal_pending(current))
> +                       flush_signals(current);
> +
> +               /* ensure we are interruptable */
> +               set_current_state(TASK_INTERRUPTIBLE);
> +
> +               /* goto sleep for the interval */
> +               schedule_timeout((HZ * poll_msec) / 1000);

Can this either be

schedule_timeout_interruptible(msecs_to_jiffies(poll_msec));

or

msleep_interruptible(poll_msec);

?

Thanks,
Nish

  reply	other threads:[~2005-10-16  3:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-15 19:06 Alan Cox
2005-10-16  3:05 ` Nish Aravamudan [this message]
2005-10-16  8:25 ` Arjan van de Ven
2005-10-17  1:48   ` Doug Thompson
2005-10-17  6:38     ` Arjan van de Ven
2005-10-17 17:59       ` Alan Cox

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=29495f1d0510152005s3643dc02ub6a0f805c6197332@mail.gmail.com \
    --to=nish.aravamudan@gmail.com \
    --cc=akpm@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --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®