Re: 1.3.12 - idle task may not sleep

Linus Torvalds (Linus.Torvalds@cs.helsinki.fi)
Tue, 25 Jul 1995 18:03:08 +0300


Hi,

Zen System Administration: "1.3.12 - idle task may not sleep" (Jul 25, 12:59):
> umm,.. not too sure how to go about explaining this one
> on a pentium p75, with a.out (not elf)
>
> during bootup I get the following (fully cut in)
>
> Console: colour VGA+ 80x25, 1 virtual console (max 63)
> pcibios_init : BIOS32 Service Directory structure at 0x000fd970
> pcibios_init : BIOS32 Service Directory entry at 0xfd980
> pcibios_init : PCI BIOS revision 2.10 entry at 0xfd9a1
> Probing PCI hardware.
> Calibrating delay loop.. ok - 29.95 BogoMips
> Serial driver version 4.11 with no serial options enabled
> tty00 at 0x03f8 (irq = 4) is a 16550A
> tty01 at 0x02f8 (irq = 3) is a 16550A
> lp0 at 0x03bc, (polling)
> PS/2 auxiliary pointing device detected -- driver installed.
> idle task may not sleep
> idle task may not sleep
> idle task may not sleep
> idle task may not sleep
> idle task may not sleep
> idle task may not sleep

This is a bug in the PS/2 mouse driver: the poll_aux_status() function
is used when initializing the driver, and poll_aux_status() will sleep.
The new scheduling code will notice these kinds of bugs - you may not
sleep in the idle task (aka "swapper"), as the idle task is supposed to
be run when no other task can run.

That said, this bug doesn't actually hurt anything: the scheduling code
is robust enough that the idle task simply never will sleep. This
problem can be fixed by either changing the PS/2 driver so that it
doesn't sleep when it's initializing, or by simply doing the
initializations later (from the "init" task, before init has been
executed, in the "setup()" system call), not in the idle task (this
would also automatically be true if the driver was loaded as a module,
for example).

Linus