Ulrich Obergfell 6e7458a6f0 kernel/watchdog.c: control hard lockup detection default
In some cases we don't want hard lockup detection enabled by default.
An example is when running as a guest.  Introduce

  watchdog_enable_hardlockup_detector(bool)

allowing those cases to disable hard lockup detection.  This must be
executed early by the boot processor from e.g.  smp_prepare_boot_cpu, in
order to allow kernel command line arguments to override it, as well as
to avoid hard lockup detection being enabled before we've had a chance
to indicate that it's unwanted.  In summary,

  initial boot:					default=enabled
  smp_prepare_boot_cpu
    watchdog_enable_hardlockup_detector(false):	default=disabled
  cmdline has 'nmi_watchdog=1':			default=enabled

The running kernel still has the ability to enable/disable at any time
with /proc/sys/kernel/nmi_watchdog us usual.  However even when the
default has been overridden /proc/sys/kernel/nmi_watchdog will initially
show '1'.  To truly turn it on one must disable/enable it, i.e.

  echo 0 > /proc/sys/kernel/nmi_watchdog
  echo 1 > /proc/sys/kernel/nmi_watchdog

This patch will be immediately useful for KVM with the next patch of this
series.  Other hypervisor guest types may find it useful as well.

[akpm@linux-foundation.org: fix build]
[dzickus@redhat.com: fix compile issues on sparc]
Signed-off-by: Ulrich Obergfell <uobergfe@redhat.com>
Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Don Zickus <dzickus@redhat.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-14 02:18:27 +02:00
..
2014-09-22 16:48:47 +09:00
2014-10-11 06:34:22 -04:00
2014-09-29 11:54:02 -04:00
2014-09-26 15:05:15 -04:00
2014-09-19 09:29:32 -04:00
2014-10-14 02:18:12 +02:00
2014-08-01 22:35:55 +08:00
2014-07-08 13:36:52 -07:00
2014-10-07 20:39:25 -04:00
2014-06-26 15:46:55 -03:00
2014-09-23 11:10:20 -07:00
2014-04-01 23:19:14 -04:00
2014-03-10 11:44:42 -04:00
2014-09-26 15:05:15 -04:00
2014-10-08 16:01:41 -04:00
2014-08-07 14:40:08 -04:00
2014-04-18 14:20:48 +02:00
2014-08-06 18:01:24 -07:00
2014-05-20 10:30:40 +09:00
2014-09-25 16:07:15 +02:00
2014-06-06 16:08:13 -07:00
2014-09-29 15:37:01 -04:00
2014-06-02 14:56:01 -07:00
2014-09-01 13:48:59 +02:00
2014-04-17 12:30:40 -07:00
2014-03-13 12:11:00 +10:30
2014-07-22 21:55:45 +01:00
2014-10-14 02:18:13 +02:00
2014-05-27 17:38:11 -07:00
2014-10-09 22:25:58 -04:00
2014-09-24 14:07:58 +02:00
2014-10-09 22:25:57 -04:00
2014-04-01 23:19:10 -04:00
2014-09-29 14:35:20 -04:00
2014-04-07 10:59:19 -07:00
2014-06-10 14:35:22 -07:00
2014-10-09 15:03:49 -04:00
2014-07-09 14:58:37 +01:00
2014-06-04 16:54:07 -07:00
2014-10-07 01:18:12 +02:00
2014-07-15 22:40:22 +02:00
2014-09-13 12:30:26 -04:00
2014-08-08 15:57:26 -07:00
2014-08-08 15:57:31 -07:00
2014-06-12 00:21:11 -04:00
2014-06-04 16:53:57 -07:00
2014-08-08 15:57:24 -07:00
2014-06-04 16:53:56 -07:00
2014-09-23 21:40:48 -07:00
2014-09-25 17:05:12 +02:00
2014-08-08 15:57:22 -07:00
2014-09-16 15:02:55 -06:00
2014-04-07 16:35:53 -07:00
2014-06-04 16:53:57 -07:00