Re: [patch 21/25] hvc_console: replace schedule_timeout() withmsleep()

From: Andrew Morton
Date: Wed Sep 01 2004 - 18:48:16 EST


maximilian attems <janitor@xxxxxxxxxxxxxx> wrote:
>
> > janitor@xxxxxxxxxxxxxx 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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/