From: maximilian attems <janitor@sternwelten.at>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, kj <kernel-janitors@osdl.org>
Subject: Re: [patch 21/25] hvc_console: replace schedule_timeout() with msleep()
Date: Thu, 2 Sep 2004 01:08:40 +0200 [thread overview]
Message-ID: <20040901230840.GG7467@stro.at> (raw)
In-Reply-To: <20040901153034.35104957.akpm@osdl.org>
On Wed, 01 Sep 2004, Andrew Morton 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()?
patch for that function was sent separately.
> Several other of your msleep conversion patches actually fix bugs. You've
> found drivers which want to sleep for a fixed period, but they do that with
> TASK_INTERRUPTIBLE. If someone sends the calling process a signal, these
> drivers will end up not sleeping at all and may fail.
i'll instantly queue some more msleep conversions up.
> I'll going through these patches and shall apply the ones which look right.
> Please consider them all to have been handled, thanks.
thanks cool :)
--
maks
kernel janitor http://janitor.kernelnewbies.org/
next prev parent reply other threads:[~2004-09-01 23:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-01 20:57 [patch 21/25] hvc_console: replace schedule_timeout() with msleep() janitor
2004-09-01 22:30 ` Andrew Morton
2004-09-01 23:08 ` maximilian attems [this message]
2004-09-01 23:36 ` 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=20040901230840.GG7467@stro.at \
--to=janitor@sternwelten.at \
--cc=akpm@osdl.org \
--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