Skip to contentSkip to conversation

Avoid triggering the softlockup BUG when offline for too long.

PATCH In review Glauber de Oliveira Costa 2 participants 2 messages Nov 29, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Avoid triggering the softlockup BUG when offline for too long.

[LINUX] Avoid triggering the softlockup BUG when offline for too long.

After being offline for a long time, the softlockup watchdog triggers a BUG() on our faces. This is expected, as in fact, we spent more than a fixed 10*HZ amount of time without touching the watchdog.

However, by inspecting the contents of stolen inside timer irq handler, we can gain awareness of the fact, and do better than that. This patch fixes it.

Signature · 3 lines
Glauber de Oliveira Costa
Red Hat Inc.
"Free as in Freedom"

# HG changeset patch
# User [email protected]
# Date 1164805648 18000
# Node ID 24d24bca629bbd8f37319de34e12202814ccdde1
# Parent 47fcd5f768fef50cba2fc6dbadc7b75de55e88a5
[LINUX] Avoid triggering the softlockup BUG when offline for too long.

After being offline for a long time, the softlockup watchdog triggers a BUG() on our faces. This is expected, as in fact, we spent more than a fixed 10*HZ amount of time without touching the watchdog.

However, by inspecting the contents of stolen inside timer irq handler, we can gain awareness of the fact, and do better than that. This patch fixes it.

linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c +3 -0
diff -r 47fcd5f768fe -r 24d24bca629b linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c
@@ -710,6 +710,9 @@ irqreturn_t timer_interrupt(int irq, voi
 					    (cputime_t)delta_cpu);
 	}
 
+	if (stolen > 10*HZ) 
+		touch_softlockup_watchdog();
+	
 	/* Local timer processing (see update_process_times()). */
 	run_local_timers();
 	if (rcu_pending(cpu))

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 9 lines · Glauber de Oliveira Costa

[LINUX] Avoid triggering the softlockup BUG when offline for too long.

After being offline for a long time, the softlockup watchdog triggers a BUG() on our faces. This is expected, as in fact, we spent more than a fixed 10*HZ amount of time without touching the watchdog.

However, by inspecting the contents of stolen inside timer irq handler, we can gain awareness of the fact, and do better than that. This patch fixes it.

Thanks. I changed the threshold to 5*HZ just to avoid marginal cases where we might be offlined for just less than 10 seconds, and then if the per-cpu watchdog process hasn't run for a second or two before we were offlined then that would push us over the edge to print a warning. 5*HZ is much more comfortable.

-- Keir