WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] xen: ensure timer tick is resumed even on CPU dr

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] xen: ensure timer tick is resumed even on CPU driving the resume
From: Shriram Rajagopalan <rshriram@xxxxxxxxx>
Date: Thu, 20 May 2010 10:42:44 -0700
Cc: stable@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, Ian Campbell <ian.campbell@xxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx
Delivery-date: Thu, 20 May 2010 10:43:32 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=t4tx0ciuPaaCYCYo2cjbzg5q0YjkaIrbzbovGCRXpwY=; b=jvwrnjZHIbAw3rpAYrgu8Su5jwBl12YiY2qnQHJ+OxMg8Uy6e53gKHIqb47Kpqqwn1 75Ker0eTk08Y8SdBl9Lg86K8Vz54+4sK6RCaywPBAO0eQybFjcNMV66FC6jQJd728s64 PmPsv9VA5aGyqWQgXk9OP/gOlbNBtyG6PpK90=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=jTfplnugt+nBu3bmphF63RyVIm2A0sAi+frRkCq0GC3kyajVcZWmzhS/JGeQUOpWrz uVfeFYM2+ioG73plD4bAcBv+I96rHAjyF9Ng5tyti6ahyqd/lT177TFcxpxV/HABY4zx NdWhTYZG12nfQquSD6o9RK1NbY9bFzh3FegQA=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4BF427AB.4080301@xxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1274283134.14939.205.camel@xxxxxxxxxxxxxxxxxxxxxx> <1274283417-5224-1-git-send-email-ian.campbell@xxxxxxxxxx> <4BF427AB.4080301@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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@xxxxxxxx> 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@xxxxxxxxxx>

   J

> Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
> Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
> Cc: Stable Kernel <stable@xxxxxxxxxx>
> ---
>  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@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel



--
perception is but an offspring of its own self
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel