Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=567f3e422a9a155d7c7643148efb5bf959065d34
Commit:     567f3e422a9a155d7c7643148efb5bf959065d34
Parent:     f2890255b0ade497893d1e5e99f519b5c1d50f7d
Author:     Andrew Morton <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 17 04:03:58 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Jul 17 10:23:04 2007 -0700

    x86_64: 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/x86_64/kernel/nmi.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/x86_64/kernel/nmi.c b/arch/x86_64/kernel/nmi.c
index 931c64b..edbbc59 100644
--- a/arch/x86_64/kernel/nmi.c
+++ b/arch/x86_64/kernel/nmi.c
@@ -296,7 +296,7 @@ static DEFINE_PER_CPU(unsigned, last_irq_sum);
 static DEFINE_PER_CPU(local_t, alert_counter);
 static DEFINE_PER_CPU(int, nmi_touch);
 
-void touch_nmi_watchdog (void)
+void touch_nmi_watchdog(void)
 {
        if (nmi_watchdog > 0) {
                unsigned cpu;
@@ -306,8 +306,10 @@ void touch_nmi_watchdog (void)
                 * do it ourselves because the alert count increase is not
                 * atomic.
                 */
-               for_each_present_cpu (cpu)
-                       per_cpu(nmi_touch, cpu) = 1;
+               for_each_present_cpu(cpu) {
+                       if (per_cpu(nmi_touch, cpu) != 1)
+                               per_cpu(nmi_touch, cpu) = 1;
+               }
        }
 
        touch_softlockup_watchdog();
-
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

Reply via email to