From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: David Vrabel <david.vrabel@citrix.com>
Cc: xen-devel@lists.xen.org, linux-kernel@vger.kernel.org,
John Stultz <john.stultz@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH 1/4] xen: disable non-boot VCPUs during suspend
Date: Wed, 19 Jun 2013 13:11:03 -0400 [thread overview]
Message-ID: <20130619171103.GD13046@phenom.dumpdata.com> (raw)
In-Reply-To: <1371655523-15609-2-git-send-email-david.vrabel@citrix.com>
On Wed, Jun 19, 2013 at 04:25:20PM +0100, David Vrabel wrote:
> From: David Vrabel <david.vrabel@citrix.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@citrix.com>
Looks like a bug-fix. But considering that the VCPU hotplug code
in PVHVM had bugs in until v3.10 it probably shouldn't even hit
stable tree.
Looks ok to me so will stick it on the 3.11 train if nobody screams.
> ---
> 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
>
next prev parent reply other threads:[~2013-06-19 17:11 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-19 15:25 [PATCHv4 0/4] xen: maintain an accurate persistent clock in more cases David Vrabel
2013-06-19 15:25 ` [PATCH 1/4] xen: disable non-boot VCPUs during suspend David Vrabel
2013-06-19 15:25 ` David Vrabel
2013-06-19 17:11 ` Konrad Rzeszutek Wilk
2013-06-19 17:11 ` Konrad Rzeszutek Wilk [this message]
2013-06-20 10:01 ` David Vrabel
2013-06-20 10:01 ` David Vrabel
2013-06-20 10:38 ` Jan Beulich
2013-06-20 10:38 ` [Xen-devel] " Jan Beulich
2013-06-20 11:46 ` David Vrabel
2013-06-20 11:46 ` David Vrabel
2013-06-19 15:25 ` [PATCH 2/4] time: add a notifier chain for when the system time is stepped David Vrabel
2013-06-19 15:25 ` David Vrabel
2013-06-19 16:52 ` John Stultz
2013-06-19 16:52 ` John Stultz
2013-06-19 17:13 ` Konrad Rzeszutek Wilk
2013-06-19 17:38 ` John Stultz
2013-06-19 17:38 ` John Stultz
2013-06-19 17:13 ` Konrad Rzeszutek Wilk
2013-06-20 10:50 ` David Vrabel
2013-06-20 10:50 ` David Vrabel
2013-06-19 15:25 ` [PATCH 3/4] x86/xen: sync the wallclock " David Vrabel
2013-06-20 10:43 ` [Xen-devel] " Jan Beulich
2013-06-20 10:43 ` Jan Beulich
2013-06-19 15:25 ` David Vrabel
2013-06-19 15:25 ` [PATCH 4/4] x86/xen: sync the CMOS RTC as well as the Xen wallclock David Vrabel
2013-06-19 15:25 ` David Vrabel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130619171103.GD13046@phenom.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=david.vrabel@citrix.com \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.