Task not on run queue?

Frodo Looijaard (frodol@dds.nl)
Fri, 11 Sep 1998 18:49:56 +0200 (CEST)


Hi folks,

I am currently working on lm_sensors (http://www.netroedge.com/~lm78), a
kernel module for reading hardware monitoring information.

A very small percentage of our users report a 'task not on run queue' error.
This complaint is from the scheduler, but I do not understand very good
what causes it. They seem to happen on 2.0.35 kernels, and at least in
one case it was an SMP machine.

At several places we have code-fragments like these:

current->state = TASK_INTERRUPTIBLE;
current->timeout = jiffies + 10;
schedule();

The idea being, of course, that the process sleeps for 10 jiffies. This
is *not* within an interrupt handler, of course.

Is the above fragment correct, or do I need to put the process explicitely
on a run queue too? Like I said, the current code seems to work perfectly
for almost anyone on both 2.0 and 2.1 kernels.

Any help is much appreciated!

Please cc: your answers to frodol@dds.nl, as my kernellist feed is not
always perfect.

Frodo

-- 
Frodo Looijaard <frodol@dds.nl>
Find my PGP public key and more at http://huizen.dds.nl/~frodol/
  Updated: a guide for installing glibc-2 as an additional target under Linux

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