Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f2890255b0ade497893d1e5e99f519b5c1d50f7d Commit: f2890255b0ade497893d1e5e99f519b5c1d50f7d Parent: 1c978b935e81da9434342f0bc8263c6cfe1214ce Author: Andrew Morton <[EMAIL PROTECTED]> AuthorDate: Tue Jul 17 04:03:57 2007 -0700 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Tue Jul 17 10:23:04 2007 -0700
i386: speedup touch_nmi_watchdog Avoid dirtying remote cpu's memory if it already has the correct value. Cc: Andi Kleen <[EMAIL PROTECTED]> Cc: Konrad Rzeszutek <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- arch/i386/kernel/nmi.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c index fba121f..03b7f55 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; + } } /* - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html