Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 567f3e42 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds
Browse files

x86_64: 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 f2890255
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -306,9 +306,11 @@ void touch_nmi_watchdog (void)
		 * do it ourselves because the alert count increase is not
		 * atomic.
		 */
		for_each_present_cpu (cpu)
		for_each_present_cpu(cpu) {
			if (per_cpu(nmi_touch, cpu) != 1)
				per_cpu(nmi_touch, cpu) = 1;
		}
	}

 	touch_softlockup_watchdog();
}