public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] softlockup: do the wakeup from a hrtimer
@ 2007-11-20  8:46 Ingo Molnar
  2007-11-26 23:26 ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Ingo Molnar @ 2007-11-20  8:46 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, Andrew Morton

Subject: softlockup: do the wakeup from a hrtimer
From: Ingo Molnar <mingo@elte.hu>

David Miller reported soft lockup false-positives that trigger on NOHZ 
due to CPUs idling for more than 10 seconds.

The solution is to drive the wakeup of the watchdog threads not from the 
timer tick (which has no guaranteed frequency), but from the watchdog 
tasks themselves.

http://bugzilla.kernel.org/show_bug.cgi?id=9409

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 kernel/softlockup.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Index: linux/kernel/softlockup.c
===================================================================
--- linux.orig/kernel/softlockup.c
+++ linux/kernel/softlockup.c
@@ -100,10 +100,6 @@ void softlockup_tick(void)
 
 	now = get_timestamp(this_cpu);
 
-	/* Wake up the high-prio watchdog task every second: */
-	if (now > (touch_timestamp + 1))
-		wake_up_process(per_cpu(watchdog_task, this_cpu));
-
 	/* Warn about unreasonable 10+ seconds delays: */
 	if (now <= (touch_timestamp + softlockup_thresh))
 		return;
@@ -141,7 +137,7 @@ static int watchdog(void *__bind_cpu)
 	while (!kthread_should_stop()) {
 		set_current_state(TASK_INTERRUPTIBLE);
 		touch_softlockup_watchdog();
-		schedule();
+		msleep(1000);
 	}
 
 	return 0;

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-11-28 12:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-20  8:46 [patch] softlockup: do the wakeup from a hrtimer Ingo Molnar
2007-11-26 23:26 ` Andrew Morton
2007-11-27 10:36   ` Ingo Molnar
2007-11-28 12:56     ` [patch] softlockup: fix false positives on CONFIG_NOHZ Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox