[patch] softlockup: fix false positives on CONFIG_NOHZ

From: Ingo Molnar
Date: Wed Nov 28 2007 - 07:57:07 EST



* Ingo Molnar <mingo@xxxxxxx> wrote:

> these can be fixed, but:
>
> > This will introduce an up-to-one-second delay in responding to
> > kthread_should_stop(). Is that bad?
>
> grumble, it's bad. I guess David is right that this should be fixed
> the right way ;-) So the above patch cannot go in.

Thomas found the right fix. David, could you try the fix below, does it
fix those false positives on your nohz Niagara cores?

Ingo

---------------->
Subject: softlockup: fix false positives on CONFIG_NOHZ
From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>

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

The solution is touch the softlockup watchdog when we return from
idle. (by definition we are not 'locked up' when we were idle)

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

Reported-by: David Miller <davem@xxxxxxxxxxxxx>
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
---
kernel/time/tick-sched.c | 2 ++
1 file changed, 2 insertions(+)

Index: linux/kernel/time/tick-sched.c
===================================================================
--- linux.orig/kernel/time/tick-sched.c
+++ linux/kernel/time/tick-sched.c
@@ -133,6 +133,8 @@ void tick_nohz_update_jiffies(void)
if (!ts->tick_stopped)
return;

+ touch_softlockup_watchdog();
+
cpu_clear(cpu, nohz_cpu_mask);
now = ktime_get();

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