summaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/nmi.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2007-07-17 13:03:57 +0200
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-17 19:23:04 +0200
commitf2890255b0ade497893d1e5e99f519b5c1d50f7d (patch)
tree54657c4bbe91325960ac2da676a5d212a8866544 /arch/i386/kernel/nmi.c
parentInhibit NMI watchdog when Alt-SysRq-T operation is underway (diff)
downloadlinux-f2890255b0ade497893d1e5e99f519b5c1d50f7d.tar.xz
linux-f2890255b0ade497893d1e5e99f519b5c1d50f7d.zip
i386: speedup touch_nmi_watchdog
Avoid dirtying remote cpu's memory if it already has the correct value. Cc: Andi Kleen <ak@suse.de> Cc: Konrad Rzeszutek <konrad@darnok.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
-rw-r--r--arch/i386/kernel/nmi.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c
index fba121f7973f..03b7f5584d71 100644
--- a/arch/i386/kernel/nmi.c
+++ b/arch/i386/kernel/nmi.c
@@ -295,7 +295,7 @@ static unsigned int
last_irq_sums [NR_CPUS],
alert_counter [NR_CPUS];
-void touch_nmi_watchdog (void)
+void touch_nmi_watchdog(void)
{
if (nmi_watchdog > 0) {
unsigned cpu;
@@ -304,8 +304,10 @@ void touch_nmi_watchdog (void)
* Just reset the alert counters, (other CPUs might be
* spinning on locks we hold):
*/
- for_each_present_cpu (cpu)
- alert_counter[cpu] = 0;
+ for_each_present_cpu(cpu) {
+ if (alert_counter[cpu])
+ alert_counter[cpu] = 0;
+ }
}
/*