From: "'Mike Travis" <travis@sgi.com>, '@sgi.com
To: Ingo Molnar <mingo@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>, Russ Anderson <rja@hpe.com>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
Dimitri Sivanich <sivanich@hpe.com>
Subject: [PATCH 3/7] x86/platform/UV: Add basic CPU NMI health check
Date: Wed, 25 Jan 2017 10:35:20 -0600 [thread overview]
Message-ID: <20170125163517.756690240@asylum.americas.sgi.com> (raw)
In-Reply-To: <20170125163517.162577002@asylum.americas.sgi.com>
[-- Attachment #1: uv4_add-health-check --]
[-- Type: text/plain, Size: 1998 bytes --]
Add a low impact health check triggered by the system NMI command
that essentially checks which CPUs are responding to external NMI's.
Signed-off-by: Mike Travis <travis@sgi.com>
Acked-by: Dimitri Sivanich <sivanich@hpe.com>
Reviewed-by: Russ Anderson <rja@hpe.com>
Reviewed-by: Alex Thorlton <athorlton@sgi.com>
---
arch/x86/platform/uv/uv_nmi.c | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
--- linux.orig/arch/x86/platform/uv/uv_nmi.c
+++ linux/arch/x86/platform/uv/uv_nmi.c
@@ -176,6 +176,7 @@ module_param_named(debug, uv_nmi_debug,
* "kdump" - do crash dump
* "kdb" - enter KDB (default)
* "kgdb" - enter KGDB
+ * "health" - check if CPUs respond to NMI
*/
static char uv_nmi_action[8] = "kdb";
module_param_string(action, uv_nmi_action, sizeof(uv_nmi_action), 0644);
@@ -571,6 +572,22 @@ static void uv_nmi_sync_exit(int master)
}
}
+/* Current "health" check is to check which CPU's are responsive */
+static void uv_nmi_action_health(int cpu, struct pt_regs *regs, int master)
+{
+ if (master) {
+ int in = atomic_read(&uv_nmi_cpus_in_nmi);
+ int out = num_online_cpus() - in;
+
+ pr_alert("UV: NMI CPU health check (non-responding:%d)\n", out);
+ atomic_set(&uv_nmi_slave_continue, SLAVE_EXIT);
+ } else {
+ while (!atomic_read(&uv_nmi_slave_continue))
+ cpu_relax();
+ }
+ uv_nmi_sync_exit(master);
+}
+
/* Walk through cpu list and dump state of each */
static void uv_nmi_dump_state(int cpu, struct pt_regs *regs, int master)
{
@@ -747,7 +764,9 @@ int uv_handle_nmi(unsigned int reason, s
uv_nmi_wait(master);
/* Process actions other than "kdump": */
- if (uv_nmi_action_is("ips") || uv_nmi_action_is("dump")) {
+ if (uv_nmi_action_is("health")) {
+ uv_nmi_action_health(cpu, regs, master);
+ } else if (uv_nmi_action_is("ips") || uv_nmi_action_is("dump")) {
uv_nmi_dump_state(cpu, regs, master);
} else if (uv_nmi_action_is("kdb") || uv_nmi_action_is("kgdb")) {
uv_call_kgdb_kdb(cpu, regs, master);
--
next prev parent reply other threads:[~2017-01-25 16:35 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-25 16:35 [PATCH 0/7] x86/platform/UV: UV Update PatchSet 2 'Mike Travis, '
2017-01-25 16:35 ` [PATCH 1/7] x86/platform/UV: Add Support for UV4 Hubless systems 'Mike Travis, '
2017-02-01 10:09 ` [tip:x86/platform] " tip-bot for travis@sgi.com
2017-01-25 16:35 ` [PATCH 2/7] x86/platform/UV: Add Support for UV4 Hubless NMIs 'Mike Travis, '
2017-02-01 10:10 ` [tip:x86/platform] " tip-bot for travis@sgi.com
2017-01-25 16:35 ` 'Mike Travis, ' [this message]
2017-02-01 10:10 ` [tip:x86/platform] x86/platform/UV: Add basic CPU NMI health check tip-bot for travis@sgi.com
2017-01-25 16:35 ` [PATCH 4/7] x86/platform/UV: Verify NMI action is valid, default is standard 'Mike Travis, '
2017-02-01 10:11 ` [tip:x86/platform] " tip-bot for travis@sgi.com
2017-01-25 16:35 ` [PATCH 5/7] x86/platform/UV: Initialize PCH GPP_D_0 NMI Pin to be NMI source 'Mike Travis, '
2017-02-01 10:11 ` [tip:x86/platform] " tip-bot for travis@sgi.com
2017-01-25 16:35 ` [PATCH 6/7] x86/platform/UV: Insure uv_system_init is called when necessary 'Mike Travis, '
2017-02-01 10:12 ` [tip:x86/platform] x86/platform/UV: Ensure " tip-bot for travis@sgi.com
2017-01-25 16:35 ` [PATCH 7/7] x86/platform/UV: Clean up NMI code to match current coding style 'Mike Travis, '
2017-02-01 10:12 ` [tip:x86/platform] x86/platform/UV: Clean up the " tip-bot for travis@sgi.com
-- strict thread matches above, loose matches on Subject: below --
2017-01-25 16:10 [PATCH 0/7] x86/platform/UV: UV Update PatchSet 2 'Mike Travis, '
2017-01-25 16:10 ` [PATCH 3/7] x86/platform/UV: Add basic CPU NMI health check 'Mike Travis, '
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170125163517.756690240@asylum.americas.sgi.com \
--to=travis@sgi.com \
--cc='@sgi.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rja@hpe.com \
--cc=sivanich@hpe.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®