Commit f2890255 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 1c978b93
...@@ -295,7 +295,7 @@ static unsigned int ...@@ -295,7 +295,7 @@ static unsigned int
last_irq_sums [NR_CPUS], last_irq_sums [NR_CPUS],
alert_counter [NR_CPUS]; alert_counter [NR_CPUS];
void touch_nmi_watchdog (void) void touch_nmi_watchdog(void)
{ {
if (nmi_watchdog > 0) { if (nmi_watchdog > 0) {
unsigned cpu; unsigned cpu;
...@@ -304,8 +304,10 @@ void touch_nmi_watchdog (void) ...@@ -304,8 +304,10 @@ void touch_nmi_watchdog (void)
* Just reset the alert counters, (other CPUs might be * Just reset the alert counters, (other CPUs might be
* spinning on locks we hold): * spinning on locks we hold):
*/ */
for_each_present_cpu (cpu) for_each_present_cpu(cpu) {
alert_counter[cpu] = 0; if (alert_counter[cpu])
alert_counter[cpu] = 0;
}
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment