All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Cc: Keir Fraser <keir.xen@gmail.com>, Jan Beulich <JBeulich@suse.com>
Subject: NMI: Enable watchdog by default
Date: Wed, 7 Mar 2012 16:55:04 +0000	[thread overview]
Message-ID: <4F5792E8.1000002@citrix.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 270 bytes --]

This patch is based on one which has been in XenServer for a very long.

To keep the trend of documentation going, it also corrects the new
command line document.

-- 
Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer
T: +44 (0)1223 225 900, http://www.citrix.com


[-- Attachment #2: enable-nmi-watchdog.patch --]
[-- Type: text/x-patch, Size: 2083 bytes --]

# HG changeset patch
# Parent e193375fb82af819eb55a1189308fcd4c1e8b40f
NMI: Enable watchdog by default.

This should make hung conditions more visible.  Change the timeout from 5
seconds to 300, as several operations on large guests take far longer than 5
seconds.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

diff -r e193375fb82a docs/misc/xen-command-line.markdown
--- a/docs/misc/xen-command-line.markdown
+++ b/docs/misc/xen-command-line.markdown
@@ -391,7 +391,10 @@ The optional `keep` parameter causes Xen
 ### watchdog
 > `= <boolean>`
 
-Run an NMI watchdog on each processor.  Defaults to disabled.
+> Default: `true`
+
+Run an NMI watchdog on each processor.  A CPU hung for more than 300 seconds will result in a panic, making hung conditions more visible.
+
 ### x2apic
 ### x2apic\_phys
 ### xencons
diff -r e193375fb82a xen/arch/x86/nmi.c
--- a/xen/arch/x86/nmi.c
+++ b/xen/arch/x86/nmi.c
@@ -425,11 +425,12 @@ void nmi_watchdog_tick(struct cpu_user_r
          !atomic_read(&watchdog_disable_count) )
     {
         /*
-         * Ayiee, looks like this CPU is stuck ... wait a few IRQs (5 seconds) 
-         * before doing the oops ...
+         * Ayiee, looks like this CPU is stuck.
+         * Wait 5 minutes before panic because some actions on large guests
+         * can take many seconds to complete.
          */
         this_cpu(alert_counter)++;
-        if ( this_cpu(alert_counter) == 5*nmi_hz )
+        if ( this_cpu(alert_counter) == 300*nmi_hz )
         {
             console_force_unlock();
             printk("Watchdog timer detects that CPU%d is stuck!\n",
diff -r e193375fb82a xen/arch/x86/setup.c
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -55,7 +55,7 @@ static unsigned int __initdata max_cpus;
 integer_param("maxcpus", max_cpus);
 
 /* opt_watchdog: If true, run a watchdog NMI on each processor. */
-static bool_t __initdata opt_watchdog;
+static bool_t __initdata opt_watchdog = 1;
 boolean_param("watchdog", opt_watchdog);
 
 /* smep: Enable/disable Supervisor Mode Execution Protection (default on). */

[-- Attachment #3: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

             reply	other threads:[~2012-03-07 16:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-07 16:55 Andrew Cooper [this message]
2012-03-07 17:08 ` NMI: Enable watchdog by default Jan Beulich
2012-03-07 17:11 ` Keir Fraser
2012-03-07 17:35   ` George Dunlap
2012-03-07 17:41     ` Keir Fraser
2012-03-07 18:14       ` NMI: watchdog timeout command line parameter Andrew Cooper
2012-03-08 10:06         ` Jan Beulich
2012-03-08 10:22           ` George Dunlap

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=4F5792E8.1000002@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=keir.xen@gmail.com \
    --cc=xen-devel@lists.xensource.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.