Commit 75152114 authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

[PATCH] x86_64: Collected NMI watchdog fixes.

Collected NMI watchdog fixes.

- Fix call of check_nmi_watchdog

- Remove earlier move of check_nmi_watchdog to later.  It does not fix the
  race it was supposed to fix fully.

- Remove unused P6 definitions

- Add support for performance counter based watchdog on P4 systems.

  This allows to run it only once per second, which saves some CPU time.
  Previously it would run at 1000Hz, which was too much.

  Code ported from i386

  Make this the default on Intel systems.

- Use check_nmi_watchdog with local APIC based nmi

- Fix race in touch_nmi_watchdog

- Fix bug that caused incorrect performance counters to be programmed in a
  few cases on K8.

- Remove useless check for local APIC

- Use local_t and per_cpu variables for per CPU data.

- Keep other CPUs busy during check_nmi_watchdog to make sure they really
  tick when in lapic mode.

- Only check CPUs that are actually online.

- Various other fixes.

- Fix fallback path when MSRs are unimplemented
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent f3c5f5e7
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include <asm/mpspec.h> #include <asm/mpspec.h>
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
#include <asm/mach_apic.h> #include <asm/mach_apic.h>
#include <asm/nmi.h>
int apic_verbosity; int apic_verbosity;
...@@ -1056,7 +1057,7 @@ int __init APIC_init_uniprocessor (void) ...@@ -1056,7 +1057,7 @@ int __init APIC_init_uniprocessor (void)
nr_ioapics = 0; nr_ioapics = 0;
#endif #endif
setup_boot_APIC_clock(); setup_boot_APIC_clock();
check_nmi_watchdog();
return 0; return 0;
} }
......
This diff is collapsed.
...@@ -56,6 +56,7 @@ ...@@ -56,6 +56,7 @@
#include <asm/kdebug.h> #include <asm/kdebug.h>
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
#include <asm/proto.h> #include <asm/proto.h>
#include <asm/nmi.h>
/* Change for real CPU hotplug. Note other files need to be fixed /* Change for real CPU hotplug. Note other files need to be fixed
first too. */ first too. */
...@@ -1030,4 +1031,6 @@ void __cpuinit smp_cpus_done(unsigned int max_cpus) ...@@ -1030,4 +1031,6 @@ void __cpuinit smp_cpus_done(unsigned int max_cpus)
detect_siblings(); detect_siblings();
time_init_gtod(); time_init_gtod();
check_nmi_watchdog();
} }
...@@ -54,4 +54,6 @@ extern void die_nmi(char *str, struct pt_regs *regs); ...@@ -54,4 +54,6 @@ extern void die_nmi(char *str, struct pt_regs *regs);
extern int panic_on_timeout; extern int panic_on_timeout;
extern int unknown_nmi_panic; extern int unknown_nmi_panic;
extern int check_nmi_watchdog(void);
#endif /* ASM_NMI_H */ #endif /* ASM_NMI_H */
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