summaryrefslogtreecommitdiffstats
path: root/freed-ora/current/f21/nowatchdog-on-virt.patch
diff options
context:
space:
mode:
authorAlexandre Oliva <lxoliva@fsfla.org>2014-07-10 04:43:24 +0000
committerAlexandre Oliva <lxoliva@fsfla.org>2014-07-10 04:43:24 +0000
commit4c72b6b46bb6961492d465e4b8c49b3c5bfd2aa5 (patch)
treec5716a40826fdeb36262043dbd16bc36b6f309da /freed-ora/current/f21/nowatchdog-on-virt.patch
parent21bd236ae910c20b71dda55f590f62ec946fb211 (diff)
downloadlinux-libre-raptor-4c72b6b46bb6961492d465e4b8c49b3c5bfd2aa5.tar.gz
linux-libre-raptor-4c72b6b46bb6961492d465e4b8c49b3c5bfd2aa5.zip
Branch for Freed-ora 21.
Diffstat (limited to 'freed-ora/current/f21/nowatchdog-on-virt.patch')
-rw-r--r--freed-ora/current/f21/nowatchdog-on-virt.patch70
1 files changed, 70 insertions, 0 deletions
diff --git a/freed-ora/current/f21/nowatchdog-on-virt.patch b/freed-ora/current/f21/nowatchdog-on-virt.patch
new file mode 100644
index 000000000..c78029a31
--- /dev/null
+++ b/freed-ora/current/f21/nowatchdog-on-virt.patch
@@ -0,0 +1,70 @@
+Bugzilla: 971139
+Upstream-status: Fedora mustard for now
+
+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.
+
+Signed-off-by: Dave Jones <davej@redhat.com>
+
+diff --git a/kernel/watchdog.c b/kernel/watchdog.c
+index 1241d8c..b2dc4e4 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>
+@@ -96,6 +97,32 @@ static int __init nosoftlockup_setup(char *str)
+ __setup("nosoftlockup", nosoftlockup_setup);
+ /* */
+
++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
+@@ -551,6 +578,8 @@ int proc_dowatchdog(struct ctl_table *table, int write,
+
+ void __init lockup_detector_init(void)
+ {
++ dmi_check_system(watchdog_virt_dmi_table);
++
+ set_sample_period();
+
+ #ifdef CONFIG_NO_HZ_FULL
OpenPOWER on IntegriCloud