diff options
author | Alexandre Oliva <lxoliva@fsfla.org> | 2014-10-09 05:10:14 +0000 |
---|---|---|
committer | Alexandre Oliva <lxoliva@fsfla.org> | 2014-10-09 05:10:14 +0000 |
commit | d85c6a16d4404de97f030cc749642f1ca4032279 (patch) | |
tree | 207c24aeafde1360c6da5f0629a34d9239331384 /freed-ora/current/f21/watchdog-Disable-watchdog-on-virtual-machines.patch | |
parent | b2678230af186e8b8b8713f55097696dc8913b53 (diff) | |
download | linux-libre-raptor-d85c6a16d4404de97f030cc749642f1ca4032279.tar.gz linux-libre-raptor-d85c6a16d4404de97f030cc749642f1ca4032279.zip |
3.17.0-300.fc21.gnu
Diffstat (limited to 'freed-ora/current/f21/watchdog-Disable-watchdog-on-virtual-machines.patch')
-rw-r--r-- | freed-ora/current/f21/watchdog-Disable-watchdog-on-virtual-machines.patch | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/freed-ora/current/f21/watchdog-Disable-watchdog-on-virtual-machines.patch b/freed-ora/current/f21/watchdog-Disable-watchdog-on-virtual-machines.patch new file mode 100644 index 000000000..23a17c054 --- /dev/null +++ b/freed-ora/current/f21/watchdog-Disable-watchdog-on-virtual-machines.patch @@ -0,0 +1,78 @@ +From: Dave Jones <davej@redhat.com> +Date: Tue, 24 Jun 2014 08:43:34 -0400 +Subject: [PATCH] watchdog: Disable watchdog on virtual machines. + +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. + +Bugzilla: 971139 +Upstream-status: Fedora mustard for now + +Signed-off-by: Dave Jones <davej@redhat.com> +--- + kernel/watchdog.c | 29 +++++++++++++++++++++++++++++ + 1 file changed, 29 insertions(+) + +diff --git a/kernel/watchdog.c b/kernel/watchdog.c +index a8d6914030fe..d0a8c308170d 100644 +--- a/kernel/watchdog.c ++++ b/kernel/watchdog.c +@@ -24,6 +24,7 @@ + #include <linux/sysctl.h> + #include <linux/smpboot.h> + #include <linux/sched/rt.h> ++#include <linux/dmi.h> + + #include <asm/irq_regs.h> + #include <linux/kvm_para.h> +@@ -112,6 +113,32 @@ static int __init softlockup_all_cpu_backtrace_setup(char *str) + __setup("softlockup_all_cpu_backtrace=", softlockup_all_cpu_backtrace_setup); + #endif + ++static int disable_watchdog(const struct dmi_system_id *d) ++{ ++ printk(KERN_INFO "watchdog: disabled (inside virtual machine)\n"); ++ watchdog_user_enabled = 0; ++ 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 = { ++ DMI_MATCH(DMI_SYS_VENDOR, "Bochs"), ++ }, ++ }, ++ {} ++}; ++ ++ + /* + * Hard-lockup warnings should be triggered after just a few seconds. Soft- + * lockups can have false positives under extreme conditions. So we generally +@@ -644,6 +671,8 @@ out: + + void __init lockup_detector_init(void) + { ++ dmi_check_system(watchdog_virt_dmi_table); ++ + set_sample_period(); + + if (watchdog_user_enabled) +-- +1.9.3 + |