Re: [ANNOUNCE] Kernel Janitor's TODO list

Manfred Spraul (manfred@colorfullife.com)
Sun, 28 Jan 2001 17:45:27 +0100


Arnaldo Carvalho de Melo wrote:
>
> Em Sun, Jan 28, 2001 at 05:14:37PM +0100, Manfred Spraul escreveu:
> > >
> > > Anything which uses sleep_on() has a 90% chance of being broken. Fix
> > > them all, because we want to remove sleep_on() and friends in 2.5.
> > >
> >
> > Then you can add 'calling schedule() with disabled local interrupts()'
> > to your list.
>
> any example of code doing this now? That way we can at least point it to
> interested people and say "look at driver foobar in kernel x.y.z and see
> how its wrong"
>

It isn't wrong to call schedule() with disabled interrupts - it's a
feature ;-)
Those 10% sleep_on() users that aren't broken use it:

for(;;) {
cli();
if(condition)
break;
sleep_on(&my_wait_queue);
sti();
}

E.g. TIOCMIWAIT in drivers/char/serial.c - a nearly correct sleep_on()
user.

But I doubt that 10% of the sleep_on() users are non-broken...

If you remove sleep_on(), then you can disallow calling schedule() with
disabled local interrupts.

--
	Manfred
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/