All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Frank Salomon <frank.salomon@wincor-nixdorf.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: driver or calculation of load average wrong ?
Date: Mon, 11 Oct 2010 12:39:15 -0700	[thread overview]
Message-ID: <20101011193915.GA9820@kroah.com> (raw)
In-Reply-To: <4CB2ADB1.6070401@wincor-nixdorf.com>

On Mon, Oct 11, 2010 at 08:24:49AM +0200, Frank Salomon wrote:
> Hello All,
>
> I have the following configuration:
> - CentOS 5
> - kernel 2.6.20.1
> - My own driver in a kernel_thread:
> 		while ( 1 ){
> 			printk ( KERN_INFO "go sleep, %lu\n", jiffies );
> 			current -> state = TASK_UNINTERRUPTIBLE;
> 			schedule_timeout ( msecs_to_jiffies(4000) );

Change this to schedule_timeout_interruptable() and your load average
calculation will go back to what you expect it to.

hope this helps,

greg k-h

  parent reply	other threads:[~2010-10-11 19:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-11  6:24 driver or calculation of load average wrong ? Frank Salomon
2010-10-11  7:40 ` Alexander Clouter
2010-10-11 19:39 ` Greg KH [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-10-07 22:48 [PATCH] dma/timberdale: simplify conditional Nicolas Kaiser
2010-10-08 12:22 ` Jack Stone
2010-10-08 12:25   ` Jack Stone
2010-10-08 12:48     ` driver or calculation of load average wrong ? Frank Salomon

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=20101011193915.GA9820@kroah.com \
    --to=greg@kroah.com \
    --cc=frank.salomon@wincor-nixdorf.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.