summaryrefslogtreecommitdiffstats
path: root/kernel/softlockup.c
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2007-05-08 00:28:05 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 11:15:06 -0700
commit04c9167f91e309c9c4ea982992aa08e83b2eb42e (patch)
treeb15e7bed8eb2e22e96971bbe3156a00683c70909 /kernel/softlockup.c
parent966812dc98e6a7fcdf759cbfa0efab77500a8868 (diff)
downloadlinux-stable-04c9167f91e309c9c4ea982992aa08e83b2eb42e.tar.gz
linux-stable-04c9167f91e309c9c4ea982992aa08e83b2eb42e.tar.bz2
linux-stable-04c9167f91e309c9c4ea982992aa08e83b2eb42e.zip
add touch_all_softlockup_watchdogs()
Add touch_all_softlockup_watchdogs() to allow the softlockup watchdog timers on all cpus to be updated. This is used to prevent sysrq-t from generating a spurious watchdog message when generating lots of output. Softlockup watchdogs use sched_clock() as its timebase, which is inherently per-cpu (at least, when it is measuring unstolen time). Because of this, it isn't possible for one CPU to directly update the other CPU's timers, but it is possible to tell the other CPUs to do update themselves appropriately. Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Acked-by: Chris Lalancette <clalance@redhat.com> Signed-off-by: Prarit Bhargava <prarit@redhat.com> Cc: Rick Lindsley <ricklind@us.ibm.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/softlockup.c')
-rw-r--r--kernel/softlockup.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/kernel/softlockup.c b/kernel/softlockup.c
index 5ea631742dbc..8fa7040247ad 100644
--- a/kernel/softlockup.c
+++ b/kernel/softlockup.c
@@ -50,6 +50,16 @@ void touch_softlockup_watchdog(void)
}
EXPORT_SYMBOL(touch_softlockup_watchdog);
+void touch_all_softlockup_watchdogs(void)
+{
+ int cpu;
+
+ /* Cause each CPU to re-update its timestamp rather than complain */
+ for_each_online_cpu(cpu)
+ per_cpu(touch_timestamp, cpu) = 0;
+}
+EXPORT_SYMBOL(touch_all_softlockup_watchdogs);
+
/*
* This callback runs from the timer interrupt, and checks
* whether the watchdog thread has hung or not:
@@ -61,9 +71,10 @@ void softlockup_tick(void)
unsigned long print_timestamp;
unsigned long now;
- /* watchdog task hasn't updated timestamp yet */
- if (touch_timestamp == 0)
+ if (touch_timestamp == 0) {
+ touch_softlockup_watchdog();
return;
+ }
print_timestamp = per_cpu(print_timestamp, this_cpu);