From: akpm@osdl.org Date: Tue, 27 Jun 2006 09:54:04 +0000 (-0700) Subject: [PATCH] IPMI: use schedule in kthread X-Git-Tag: firefly_0821_release~34923 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=33979734cd35ae0624337cdbc529921e4350d96f;p=firefly-linux-kernel-4.4.55.git [PATCH] IPMI: use schedule in kthread Corey Minyard The kthread used to speed up polling for IPMI was using udelay in its busy-wait polling loop when the lower-level state machine told it to do a short delay. This just used CPU and didn't help scheduling, thus causing bad problems with other tasks. Call schedule() instead. Signed-off-by: Corey Minyard Acked-by: Matt Domsch Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 02a7dd7a8a55..101c14b9b26d 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c @@ -809,7 +809,7 @@ static int ipmi_thread(void *data) /* do nothing */ } else if (smi_result == SI_SM_CALL_WITH_DELAY) - udelay(1); + schedule(); else schedule_timeout_interruptible(1); }