* [GIT PULL] xen suspend resume fix.
@ 2010-05-19 15:35 Ian Campbell
2010-05-19 15:55 ` [PATCH] xen: ensure timer tick is resumed even on CPU driving the resume Ian Campbell
0 siblings, 1 reply; 6+ messages in thread
From: Ian Campbell @ 2010-05-19 15:35 UTC (permalink / raw)
To: Jeremy Fitzhardinge; +Cc: xen-devel, linux-kernel, stable
The following changes since commit aff67593b7fb2efa1ba17eb07ded96519b6b7cc1:
Ian Campbell (1):
xenbus: do not hold transaction_mutex when returning to userspace
are available in the git repository at:
git://xenbits.xensource.com/people/ianc/linux-2.6.git for-jeremy/saverestore
Ian Campbell (1):
xen: ensure timer tick is resumed even on CPU driving the resume
arch/x86/xen/suspend.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
(this is based on xen.git#bugfix branch. I didn't base on 2.6.32 since
the prerequisite patches were only in 2.6.33 and 2.6.32.2. this is not
an area with a great deal of churn so it should merge around ok)
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH] xen: ensure timer tick is resumed even on CPU driving the resume
2010-05-19 15:35 [GIT PULL] xen suspend resume fix Ian Campbell
@ 2010-05-19 15:55 ` Ian Campbell
0 siblings, 0 replies; 6+ messages in thread
From: Ian Campbell @ 2010-05-19 15:55 UTC (permalink / raw)
Cc: xen-devel, linux-kernel, stable, Ian Campbell,
Jeremy Fitzhardinge
The core suspend/resume code is run from stop_machine on CPU0 but
parts of the suspend/resume machinery (including xen_arch_resume) are
run on whichever CPU happened to schedule the xenwatch kernel thread.
As part of the non-core resume code xen_arch_resume is called in order
to restart the timer tick on non-boot processors. The boot processor
itself is taken care of by core timekeeping code.
xen_arch_resume uses smp_call_function which does not call the given
function on the current processor. This means that we can end up with
one CPU not receiving timer ticks if the xenwatch thread happened to
be scheduled on CPU > 0.
Use on_each_cpu instead of smp_call_function to ensure the timer tick
is resumed everywhere.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Stable Kernel <stable@kernel.org>
---
Resend with correct in-reply-to.
arch/x86/xen/suspend.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/xen/suspend.c b/arch/x86/xen/suspend.c
index 987267f..a9c6611 100644
--- a/arch/x86/xen/suspend.c
+++ b/arch/x86/xen/suspend.c
@@ -60,6 +60,6 @@ static void xen_vcpu_notify_restore(void *data)
void xen_arch_resume(void)
{
- smp_call_function(xen_vcpu_notify_restore,
- (void *)CLOCK_EVT_NOTIFY_RESUME, 1);
+ on_each_cpu(xen_vcpu_notify_restore,
+ (void *)CLOCK_EVT_NOTIFY_RESUME, 1);
}
--
1.5.6.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
[parent not found: <1274283134.14939.205.camel@zakaz.uk.xensource.com>]
* [PATCH] xen: ensure timer tick is resumed even on CPU driving the resume
[not found] <1274283134.14939.205.camel@zakaz.uk.xensource.com>
@ 2010-05-19 15:36 ` Ian Campbell
2010-05-19 18:02 ` [Xen-devel] " Jeremy Fitzhardinge
0 siblings, 1 reply; 6+ messages in thread
From: Ian Campbell @ 2010-05-19 15:36 UTC (permalink / raw)
Cc: Ian Campbell, xen-devel, linux-kernel, Jeremy Fitzhardinge,
stable
The core suspend/resume code is run from stop_machine on CPU0 but
parts of the suspend/resume machinery (including xen_arch_resume) are
run on whichever CPU happened to schedule the xenwatch kernel thread.
As part of the non-core resume code xen_arch_resume is called in order
to restart the timer tick on non-boot processors. The boot processor
itself is taken care of by core timekeeping code.
xen_arch_resume uses smp_call_function which does not call the given
function on the current processor. This means that we can end up with
one CPU not receiving timer ticks if the xenwatch thread happened to
be scheduled on CPU > 0.
Use on_each_cpu instead of smp_call_function to ensure the timer tick
is resumed everywhere.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Stable Kernel <stable@kernel.org>
---
arch/x86/xen/suspend.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/xen/suspend.c b/arch/x86/xen/suspend.c
index 987267f..a9c6611 100644
--- a/arch/x86/xen/suspend.c
+++ b/arch/x86/xen/suspend.c
@@ -60,6 +60,6 @@ static void xen_vcpu_notify_restore(void *data)
void xen_arch_resume(void)
{
- smp_call_function(xen_vcpu_notify_restore,
- (void *)CLOCK_EVT_NOTIFY_RESUME, 1);
+ on_each_cpu(xen_vcpu_notify_restore,
+ (void *)CLOCK_EVT_NOTIFY_RESUME, 1);
}
--
1.5.6.5
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [Xen-devel] [PATCH] xen: ensure timer tick is resumed even on CPU driving the resume
2010-05-19 15:36 ` Ian Campbell
@ 2010-05-19 18:02 ` Jeremy Fitzhardinge
2010-05-20 17:42 ` Shriram Rajagopalan
0 siblings, 1 reply; 6+ messages in thread
From: Jeremy Fitzhardinge @ 2010-05-19 18:02 UTC (permalink / raw)
To: Ian Campbell; +Cc: xen-devel, linux-kernel, stable
On 05/19/2010 08:36 AM, Ian Campbell wrote:
> The core suspend/resume code is run from stop_machine on CPU0 but
> parts of the suspend/resume machinery (including xen_arch_resume) are
> run on whichever CPU happened to schedule the xenwatch kernel thread.
>
> As part of the non-core resume code xen_arch_resume is called in order
> to restart the timer tick on non-boot processors. The boot processor
> itself is taken care of by core timekeeping code.
>
> xen_arch_resume uses smp_call_function which does not call the given
> function on the current processor. This means that we can end up with
> one CPU not receiving timer ticks if the xenwatch thread happened to
> be scheduled on CPU > 0.
>
> Use on_each_cpu instead of smp_call_function to ensure the timer tick
> is resumed everywhere.
>
Argh, that seems to be a pretty common trap to fall into. Looks OK (but
unfortunately doesn't fix my other problem).
Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
J
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> Cc: Jeremy Fitzhardinge <jeremy@goop.org>
> Cc: Stable Kernel <stable@kernel.org>
> ---
> arch/x86/xen/suspend.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/xen/suspend.c b/arch/x86/xen/suspend.c
> index 987267f..a9c6611 100644
> --- a/arch/x86/xen/suspend.c
> +++ b/arch/x86/xen/suspend.c
> @@ -60,6 +60,6 @@ static void xen_vcpu_notify_restore(void *data)
>
> void xen_arch_resume(void)
> {
> - smp_call_function(xen_vcpu_notify_restore,
> - (void *)CLOCK_EVT_NOTIFY_RESUME, 1);
> + on_each_cpu(xen_vcpu_notify_restore,
> + (void *)CLOCK_EVT_NOTIFY_RESUME, 1);
> }
>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] xen: ensure timer tick is resumed even on CPU driving the resume
2010-05-19 18:02 ` [Xen-devel] " Jeremy Fitzhardinge
@ 2010-05-20 17:42 ` Shriram Rajagopalan
2010-05-20 18:14 ` Jeremy Fitzhardinge
0 siblings, 1 reply; 6+ messages in thread
From: Shriram Rajagopalan @ 2010-05-20 17:42 UTC (permalink / raw)
To: Jeremy Fitzhardinge; +Cc: stable, xen-devel, Ian Campbell, linux-kernel
[-- Attachment #1.1: Type: text/plain, Size: 2270 bytes --]
I know this is a long shot but is there an equivalent piece of code in the
2.6.18.8-xen kernel where this patch could be applied ? Assuming that the
2.6.18 also has a similar bug.
On Wed, May 19, 2010 at 11:02 AM, Jeremy Fitzhardinge <jeremy@goop.org>wrote:
> On 05/19/2010 08:36 AM, Ian Campbell wrote:
> > The core suspend/resume code is run from stop_machine on CPU0 but
> > parts of the suspend/resume machinery (including xen_arch_resume) are
> > run on whichever CPU happened to schedule the xenwatch kernel thread.
> >
> > As part of the non-core resume code xen_arch_resume is called in order
> > to restart the timer tick on non-boot processors. The boot processor
> > itself is taken care of by core timekeeping code.
> >
> > xen_arch_resume uses smp_call_function which does not call the given
> > function on the current processor. This means that we can end up with
> > one CPU not receiving timer ticks if the xenwatch thread happened to
> > be scheduled on CPU > 0.
> >
> > Use on_each_cpu instead of smp_call_function to ensure the timer tick
> > is resumed everywhere.
> >
>
> Argh, that seems to be a pretty common trap to fall into. Looks OK (but
> unfortunately doesn't fix my other problem).
>
> Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
>
> J
>
> > Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> > Cc: Jeremy Fitzhardinge <jeremy@goop.org>
> > Cc: Stable Kernel <stable@kernel.org>
> > ---
> > arch/x86/xen/suspend.c | 4 ++--
> > 1 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/x86/xen/suspend.c b/arch/x86/xen/suspend.c
> > index 987267f..a9c6611 100644
> > --- a/arch/x86/xen/suspend.c
> > +++ b/arch/x86/xen/suspend.c
> > @@ -60,6 +60,6 @@ static void xen_vcpu_notify_restore(void *data)
> >
> > void xen_arch_resume(void)
> > {
> > - smp_call_function(xen_vcpu_notify_restore,
> > - (void *)CLOCK_EVT_NOTIFY_RESUME, 1);
> > + on_each_cpu(xen_vcpu_notify_restore,
> > + (void *)CLOCK_EVT_NOTIFY_RESUME, 1);
> > }
> >
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
--
perception is but an offspring of its own self
[-- Attachment #1.2: Type: text/html, Size: 3235 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] xen: ensure timer tick is resumed even on CPU driving the resume
2010-05-20 17:42 ` Shriram Rajagopalan
@ 2010-05-20 18:14 ` Jeremy Fitzhardinge
0 siblings, 0 replies; 6+ messages in thread
From: Jeremy Fitzhardinge @ 2010-05-20 18:14 UTC (permalink / raw)
To: Shriram Rajagopalan; +Cc: stable, xen-devel, Ian Campbell, linux-kernel
On 05/20/2010 10:42 AM, Shriram Rajagopalan wrote:
> I know this is a long shot but is there an equivalent piece of code in
> the 2.6.18.8-xen kernel where this patch could be applied ? Assuming
> that the 2.6.18 also has a similar bug.
Very unlikely. Time is completely different in 2.6.18-xen.
J
^ permalink raw reply [flat|nested] 6+ messages in thread
* [GIT 0/2] fixes for Xen live migration
@ 2010-06-03 8:44 Ian Campbell
2010-06-03 8:44 ` [PATCH] xen: ensure timer tick is resumed even on CPU driving the resume Ian Campbell
0 siblings, 1 reply; 6+ messages in thread
From: Ian Campbell @ 2010-06-03 8:44 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Jeremy Fitzhardinge, xen-devel, stable
Hi Linus,
These changes fix a couple of issues with save/restore or migration of
Xen guests and have both been acked by Jeremy Fitzhardinge (Xen
maintainer) for sending to you direct
(http://marc.info/?l=xen-devel&m=127549692721092)
Ian.
The following changes since commit 67a3e12b05e055c0415c556a315a3d3eb637e29e:
Linus Torvalds (1):
Linux 2.6.35-rc1
are available in the git repository at:
git://xenbits.xensource.com/people/ianc/linux-2.6.git for-linus/bugfixes
Ian Campbell (2):
xen: ensure timer tick is resumed even on CPU driving the resume
xen: avoid allocation causing potential swap activity on the resume path
arch/x86/xen/suspend.c | 4 ++--
drivers/xen/xenbus/xenbus_xs.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH] xen: ensure timer tick is resumed even on CPU driving the resume
2010-06-03 8:44 [GIT 0/2] fixes for Xen live migration Ian Campbell
@ 2010-06-03 8:44 ` Ian Campbell
0 siblings, 0 replies; 6+ messages in thread
From: Ian Campbell @ 2010-06-03 8:44 UTC (permalink / raw)
To: Linus Torvalds; +Cc: xen-devel, Ian Campbell
The core suspend/resume code is run from stop_machine on CPU0 but
parts of the suspend/resume machinery (including xen_arch_resume) are
run on whichever CPU happened to schedule the xenwatch kernel thread.
As part of the non-core resume code xen_arch_resume is called in order
to restart the timer tick on non-boot processors. The boot processor
itself is taken care of by core timekeeping code.
xen_arch_resume uses smp_call_function which does not call the given
function on the current processor. This means that we can end up with
one CPU not receiving timer ticks if the xenwatch thread happened to
be scheduled on CPU > 0.
Use on_each_cpu instead of smp_call_function to ensure the timer tick
is resumed everywhere.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Stable Kernel <stable@kernel.org> # .32.x
---
arch/x86/xen/suspend.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/xen/suspend.c b/arch/x86/xen/suspend.c
index 987267f..a9c6611 100644
--- a/arch/x86/xen/suspend.c
+++ b/arch/x86/xen/suspend.c
@@ -60,6 +60,6 @@ static void xen_vcpu_notify_restore(void *data)
void xen_arch_resume(void)
{
- smp_call_function(xen_vcpu_notify_restore,
- (void *)CLOCK_EVT_NOTIFY_RESUME, 1);
+ on_each_cpu(xen_vcpu_notify_restore,
+ (void *)CLOCK_EVT_NOTIFY_RESUME, 1);
}
--
1.5.6.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-06-03 8:44 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-19 15:35 [GIT PULL] xen suspend resume fix Ian Campbell
2010-05-19 15:55 ` [PATCH] xen: ensure timer tick is resumed even on CPU driving the resume Ian Campbell
[not found] <1274283134.14939.205.camel@zakaz.uk.xensource.com>
2010-05-19 15:36 ` Ian Campbell
2010-05-19 18:02 ` [Xen-devel] " Jeremy Fitzhardinge
2010-05-20 17:42 ` Shriram Rajagopalan
2010-05-20 18:14 ` Jeremy Fitzhardinge
-- strict thread matches above, loose matches on Subject: below --
2010-06-03 8:44 [GIT 0/2] fixes for Xen live migration Ian Campbell
2010-06-03 8:44 ` [PATCH] xen: ensure timer tick is resumed even on CPU driving the resume Ian Campbell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).