msleep_interruptible vs msleep

matthieu castet
2006-09-04T19:29:55Z

Hi,

What's the difference between msleep_interruptible and msleep ?
If I understand correctly the main difference between msleep and
msleep_interruptible is that msleep_interruptible can return if there is
a pending signal ?

But why if I have a kernel thread that do [1] :

while (true) {
Do some stuff
msleep(1000)
}

the load average is high (near 100%).

and if I use msleep_interruptible the load average is normal.

Does the same applies to wait_event_timeout vs
wait_event_interruptible_timeout ?

Thanks,

Matthieu CASTET