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] xenbus stress testing

To: Olaf Hering <olaf@xxxxxxxxx>, James Harper <james.harper@xxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] xenbus stress testing
From: Paul Durrant <Paul.Durrant@xxxxxxxxxx>
Date: Fri, 18 Feb 2011 11:43:32 +0000
Accept-language: en-US
Acceptlanguage: en-US
Cc: Ian, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Delivery-date: Fri, 18 Feb 2011 03:44:50 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110218110524.GA10012@xxxxxxxxx>
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: <AEC6C66638C05B468B556EA548C1A77D01C556B6@trantor> <19805.29093.996401.185391@xxxxxxxxxxxxxxxxxxxxxxxx> <AEC6C66638C05B468B556EA548C1A77D01C556C5@trantor> <20110218110524.GA10012@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcvPW++7zxTIKcxLReWG0iZLiGnhpwABQw2w
Thread-topic: [Xen-devel] xenbus stress testing
How do you propose to lock against another VM updating a counter in shared 
memory?

  Paul

> -----Original Message-----
> From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx [mailto:xen-devel-
> bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Olaf Hering
> Sent: 18 February 2011 11:05
> To: James Harper
> Cc: xen-devel@xxxxxxxxxxxxxxxxxxx; Ian Jackson
> Subject: Re: [Xen-devel] xenbus stress testing
> 
> On Fri, Feb 18, James Harper wrote:
> 
> > I think I have found the error and it was probably a 1 in a
> million
> > race so stress testing might not have helped anyway. My code went:
> >
> > len = min(ring->rsp_prod - ring->rsp_cons, msg_size)
> >
> > and the ASSERT was hit because len was > msg_size, and the only
> > possible way I can ever see that happening is if ring->rsp_prod
> > changed between the if in the min() and the assignment. I'm now
> > snapshotting rsp_prod to a local variable at the start. Kind of
> > embarrassing really as plenty of example code exists.
> 
> Why is there no lock to protect the ring accesses?
> 
> Olaf
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel