[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.