mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: maximilian attems <janitor@sternwelten.at>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@osdl.org
Subject: Re: [patch 21/25]  hvc_console: replace schedule_timeout() with msleep()
Date: Wed, 1 Sep 2004 16:36:49 -0700	[thread overview]
Message-ID: <20040901163649.7e4f1060.akpm@osdl.org> (raw)
In-Reply-To: <20040901230840.GG7467@stro.at>

maximilian attems <janitor@sternwelten.at> wrote:
>
> > janitor@sternwelten.at wrote:
> > >
> > > -#define TIMEOUT		((HZ + 99) / 100)
> > > +#define TIMEOUT		10
> > >  
> > >  static struct tty_driver *hvc_driver;
> > >  static int hvc_offset;
> > > @@ -276,8 +277,7 @@ int khvcd(void *unused)
> > >  			for (i = 0; i < MAX_NR_HVC_CONSOLES; ++i)
> > >  				hvc_poll(i);
> > >  		}
> > > -		set_current_state(TASK_INTERRUPTIBLE);
> > > -		schedule_timeout(TIMEOUT);
> > > +		msleep(TIMEOUT);
> > 
> > This one is wrong: we need to sleep in interruptible state here, otherwise
> > this kernel thread will contribute to the system load average.
> 
> could we add for such cases msleep_interruptible()?

Sure.

Note that you're raising patches against some ancient kernel and that this
particular function has changed.

      reply	other threads:[~2004-09-01 23:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-01 20:57 janitor
2004-09-01 22:30 ` Andrew Morton
2004-09-01 23:08   ` maximilian attems
2004-09-01 23:36     ` Andrew Morton [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=20040901163649.7e4f1060.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=janitor@sternwelten.at \
    --cc=kernel-janitors@osdl.org \
    --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

Powered by JetHome