2014-06-24 14:14:12 +00:00
|
|
|
From: Dave Jones <davej@redhat.com>
|
|
|
|
Date: Tue, 24 Jun 2014 08:43:34 -0400
|
2014-08-20 17:22:24 +00:00
|
|
|
Subject: [PATCH] watchdog: Disable watchdog on virtual machines.
|
2013-06-11 20:36:11 +00:00
|
|
|
|
|
|
|
For various reasons, VMs seem to trigger the soft lockup detector a lot,
|
|
|
|
in cases where it's just not possible for a lockup to occur.
|
|
|
|
(Example: https://bugzilla.redhat.com/show_bug.cgi?id=971139)
|
|
|
|
|
|
|
|
In some cases it seems that the host just never scheduled the app running
|
|
|
|
the VM for a very long time (Could be the host was under heavy load).
|
|
|
|
|
|
|
|
Just disable the detector on VMs.
|
|
|
|
|
2014-08-20 17:22:24 +00:00
|
|
|
Bugzilla: 971139
|
|
|
|
Upstream-status: Fedora mustard for now
|
|
|
|
|
2013-06-11 20:36:11 +00:00
|
|
|
Signed-off-by: Dave Jones <davej@redhat.com>
|
2014-06-24 14:14:12 +00:00
|
|
|
---
|
|
|
|
kernel/watchdog.c | 29 +++++++++++++++++++++++++++++
|
|
|
|
1 file changed, 29 insertions(+)
|
2013-06-11 20:36:11 +00:00
|
|
|
|
|
|
|
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
|
2015-06-26 13:33:38 +00:00
|
|
|
index a6ffa43f2993..b378b762844a 100644
|
2013-06-11 20:36:11 +00:00
|
|
|
--- a/kernel/watchdog.c
|
|
|
|
+++ b/kernel/watchdog.c
|
2015-06-26 13:33:38 +00:00
|
|
|
@@ -20,6 +20,7 @@
|
2013-06-11 20:36:11 +00:00
|
|
|
#include <linux/smpboot.h>
|
|
|
|
#include <linux/sched/rt.h>
|
2015-06-26 13:33:38 +00:00
|
|
|
#include <linux/tick.h>
|
2013-06-11 20:36:11 +00:00
|
|
|
+#include <linux/dmi.h>
|
|
|
|
|
|
|
|
#include <asm/irq_regs.h>
|
|
|
|
#include <linux/kvm_para.h>
|
2015-06-26 13:33:38 +00:00
|
|
|
@@ -155,6 +156,32 @@ static int __init softlockup_all_cpu_backtrace_setup(char *str)
|
2014-06-24 14:14:12 +00:00
|
|
|
__setup("softlockup_all_cpu_backtrace=", softlockup_all_cpu_backtrace_setup);
|
|
|
|
#endif
|
2013-06-11 20:36:11 +00:00
|
|
|
|
|
|
|
+static int disable_watchdog(const struct dmi_system_id *d)
|
|
|
|
+{
|
|
|
|
+ printk(KERN_INFO "watchdog: disabled (inside virtual machine)\n");
|
2013-07-17 02:56:52 +00:00
|
|
|
+ watchdog_user_enabled = 0;
|
2013-06-11 20:36:11 +00:00
|
|
|
+ return 0;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static const struct dmi_system_id watchdog_virt_dmi_table[] = {
|
|
|
|
+ {
|
|
|
|
+ .callback = disable_watchdog,
|
|
|
|
+ .ident = "VMware",
|
|
|
|
+ .matches = {
|
|
|
|
+ DMI_MATCH(DMI_SYS_VENDOR, "VMware, Inc."),
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .callback = disable_watchdog,
|
|
|
|
+ .ident = "Bochs",
|
|
|
|
+ .matches = {
|
2013-12-18 15:29:25 +00:00
|
|
|
+ DMI_MATCH(DMI_SYS_VENDOR, "Bochs"),
|
2013-06-11 20:36:11 +00:00
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ {}
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+
|
|
|
|
/*
|
|
|
|
* Hard-lockup warnings should be triggered after just a few seconds. Soft-
|
|
|
|
* lockups can have false positives under extreme conditions. So we generally
|
2015-06-26 13:33:38 +00:00
|
|
|
@@ -928,6 +955,8 @@ int proc_watchdog_cpumask(struct ctl_table *table, int write,
|
2013-06-11 20:36:11 +00:00
|
|
|
|
|
|
|
void __init lockup_detector_init(void)
|
|
|
|
{
|
|
|
|
+ dmi_check_system(watchdog_virt_dmi_table);
|
|
|
|
+
|
|
|
|
set_sample_period();
|
2013-07-17 02:56:52 +00:00
|
|
|
|
2015-06-26 13:33:38 +00:00
|
|
|
#ifdef CONFIG_NO_HZ_FULL
|