[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1320425712-5312-6-git-send-email-emunson@mgebm.net>
Date: Fri, 4 Nov 2011 12:55:11 -0400
From: Eric B Munson <emunson@...bm.net>
To: avi@...hat.com
Cc: Eric B Munson <emunson@...bm.net>, mingo@...hat.com, hpa@...or.com,
arnd@...db.de, ryanh@...ux.vnet.ibm.com, aliguori@...ibm.com,
mtosatti@...hat.com, jeremy.fitzhardinge@...rix.com,
kvm@...r.kernel.org, linux-arch@...r.kernel.org, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 5/6 V3] Add check for suspended vm in softlockup detector
A suspended VM can cause spurious soft lockup warnings. To avoid these, the
watchdog now checks if the kernel knows it was stopped by the host and skips
the warning if so.
Signed-off-by: Eric B Munson <emunson@...bm.net>
Cc: mingo@...hat.com
Cc: hpa@...or.com
Cc: arnd@...db.de
Cc: ryanh@...ux.vnet.ibm.com
Cc: aliguori@...ibm.com
Cc: mtosatti@...hat.com
Cc: jeremy.fitzhardinge@...rix.com
Cc: kvm@...r.kernel.org
Cc: linux-arch@...r.kernel.org
Cc: x86@...nel.org
Cc: linux-kernel@...r.kernel.org
---
kernel/watchdog.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 1d7bca7..b5a1c08 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -25,6 +25,7 @@
#include <linux/sysctl.h>
#include <asm/irq_regs.h>
+#include <linux/kvm_para.h>
#include <linux/perf_event.h>
int watchdog_enabled = 1;
@@ -292,6 +293,14 @@ static enum hrtimer_restart watchdog_timer_fn(struct hrtimer *hrtimer)
*/
duration = is_softlockup(touch_ts);
if (unlikely(duration)) {
+ /*
+ * If a virtual machine is stopped by the host it can look to
+ * the watchdog like a soft lockup, check to see if the host
+ * stopped the vm before we issue the warning
+ */
+ if (kvm_check_and_clear_guest_paused(smp_processor_id()))
+ return HRTIMER_RESTART;
+
/* only warn once */
if (__this_cpu_read(soft_watchdog_warn) == true)
return HRTIMER_RESTART;
--
1.7.5.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists