Messages in this thread Patch in this message | | | Date | Mon, 27 Sep 2004 20:25:52 +1000 | Subject | [PATCH] Use msleep_interruptible for therm_adt7467.c kernel thread | From | Herbert Xu <> |
| |
Hi:
Using msleep() in a kernel thread causes it to show up in the D state and contribute towards the system load average. The following patch converts it to msleep_interruptible().
The continue is just paranoia in case something relies on the sleep to take 2 seconds or more.
This bug was reported at
https://bugzilla.no-name-yet.com/show_bug.cgi?id=1804
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt ===== drivers/macintosh/therm_adt746x.c 1.5 vs edited ===== --- 1.5/drivers/macintosh/therm_adt746x.c 2004-09-23 06:31:14 +10:00 +++ edited/drivers/macintosh/therm_adt746x.c 2004-09-27 20:24:58 +10:00 @@ -246,7 +246,8 @@ while(monitor_running) { - msleep(2000); + if (msleep_interruptible(2000)) + continue; /* Check status */ /* local : chip */ | |