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] workaround for bug#197: second try

To: Ryan Harper <ryanh@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] workaround for bug#197: second try
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Tue, 13 Sep 2005 20:04:39 +0100
Cc: Dan Smith <danms@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, "Puthiyaparambil, Aravindh" <aravindh.puthiyaparambil@xxxxxxxxxx>
Delivery-date: Tue, 13 Sep 2005 19:09:30 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20050913182219.GA11410@xxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20050909220719.GP8187@xxxxxxxxxx> <20050912212740.GB8009@xxxxxxxxxx> <20050913182219.GA11410@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

On 13 Sep 2005, at 19:22, Ryan Harper wrote:


If we are to believe the comment, (which makes sense), then the while loop code is broken. That is, this function will spin until *any* of the three tests returns false rather than waiting until *all* tests are false. This patch switches the &&s to ||s and inverts the domain_runnable() check. I believe we want to spin while 1) vcpu_running flag is up 2) the domain is runnable and 3)
the scheduler lock is held.

Good catch. Actually we want to spin only while the domain is non-runnable (just to catch the very unlikely event that someone else wakes the domain while we spin). I updated the comment and the loop predicate and checked the patch in. Thanks!

 -- Keir


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel