[PATCH 2/2] x86/platform/uv: Use low priority low frequency NMI call chain

From: Mike Travis
Date: Mon Mar 06 2017 - 13:36:56 EST


Use the new NMI call chain NMI_LAST instead of the NMI_UNKNOWN call
chain to eliminate the WARNING message about having multiple NMI
handlers registering on the NMI UNKNOWN call chain.

This "call only when not already claimed by another NMI handler" is
required as the UV architecture cannot sustain a high rate of reads
to the MMR's on the UV HUB's to verify if the NMI should be claimed.
This not only slows down the system responsiveness, it can result in
a system lockup.

Signed-off-by: Mike Travis <mike.travis@xxxxxxx>
Reviewed-by: Russ Anderson <russ.anderson@xxxxxxx>
---
arch/x86/platform/uv/uv_nmi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- linux-4.4.orig/arch/x86/platform/uv/uv_nmi.c
+++ linux-4.4/arch/x86/platform/uv/uv_nmi.c
@@ -53,7 +53,7 @@
* disrupts the UV Hub's primary mission of directing NumaLink traffic and
* can cause system problems to occur.
*
- * To do this we register our primary NMI notifier on the NMI_UNKNOWN
+ * To do this we register our primary NMI notifier on the NMI_LAST
* chain. This reduces the number of false NMI calls when the perf
* tools are running which generate an enormous number of NMIs per
* second (~4M/s for 1024 CPU threads). Our secondary NMI handler is
@@ -992,7 +992,7 @@ static int uv_handle_nmi_ping(unsigned i

static void uv_register_nmi_notifier(void)
{
- if (register_nmi_handler(NMI_UNKNOWN, uv_handle_nmi, 0, "uv"))
+ if (register_nmi_handler(NMI_LAST, uv_handle_nmi, 0, "uv"))
pr_warn("UV: NMI handler failed to register\n");

if (register_nmi_handler(NMI_LOCAL, uv_handle_nmi_ping, 0, "uvping"))

--