[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1371655523-15609-2-git-send-email-david.vrabel@citrix.com>
Date: Wed, 19 Jun 2013 16:25:20 +0100
From: David Vrabel <david.vrabel@...rix.com>
To: <xen-devel@...ts.xen.org>
CC: David Vrabel <david.vrabel@...rix.com>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
<linux-kernel@...r.kernel.org>,
John Stultz <john.stultz@...aro.org>,
Thomas Gleixner <tglx@...utronix.de>
Subject: [PATCH 1/4] xen: disable non-boot VCPUs during suspend
From: David Vrabel <david.vrabel@...rix.com>
syscore_suspend() and syscore_resume() expect there to be only one
online CPU. e.g., hrtimers_resume() only triggers events for the
current CPU. Xen's suspend path was leaving all VCPUs online and then
attempting to fixup problems afterwards (e.g., with an explicit call
to clock_was_set() to trigger pending high resolution timers).
Instead, disable non-boot CPUs before calling stop_machine() and
reenable them afterwards.
This is then similar to what the kexec code does before and after a
kexec jump (see kernel_kexec() in kernel/kexec.c).
Signed-off-by: David Vrabel <david.vrabel@...rix.com>
---
drivers/xen/manage.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c
index 412b96c..596e55a 100644
--- a/drivers/xen/manage.c
+++ b/drivers/xen/manage.c
@@ -148,8 +148,19 @@ static void do_suspend(void)
si.post = &xen_post_suspend;
}
+ /*
+ * syscore_suspend() and syscore_resume() called in
+ * xen_suspend() above, assume that only the boot CPU is
+ * online.
+ */
+ err = disable_nonboot_cpus();
+ if (err)
+ goto out_resume;
+
err = stop_machine(xen_suspend, &si, cpumask_of(0));
+ enable_nonboot_cpus();
+
dpm_resume_start(si.cancelled ? PMSG_THAW : PMSG_RESTORE);
if (err) {
@@ -166,9 +177,6 @@ out_resume:
dpm_resume_end(si.cancelled ? PMSG_THAW : PMSG_RESTORE);
- /* Make sure timer events get retriggered on all CPUs */
- clock_was_set();
-
out_thaw:
#ifdef CONFIG_PREEMPT
thaw_processes();
--
1.7.2.5
--
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