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] xenstore ring overflow when too many watches are fired

To: "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] xenstore ring overflow when too many watches are fired
From: "James Harper" <james.harper@xxxxxxxxxxxxxxxx>
Date: Thu, 8 Oct 2009 22:22:41 +1100
Cc:
Delivery-date: Thu, 08 Oct 2009 04:23:18 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C6F386CF.16E09%keir.fraser@xxxxxxxxxxxxx>
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: <AEC6C66638C05B468B556EA548C1A77D0177D86A@trantor> <C6F386CF.16E09%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcpIBq1xI/hXC2nOST2UVLFiVzrk3AAAQduAAABKkIA=
Thread-topic: [Xen-devel] xenstore ring overflow when too many watches are fired
> > Are there any protections in xenstored (which does the writing I
think)
> > against xenstore ring overflow caused by a large number (>23 I
think) of
> > watches firing in unison? I can't see any...
> >
> 
> Messages (whether replies or watch notifications) get stored on a
> per-connection linked list and trickled onto the shared ring as space
> becomes available. It shouldn't be possible for the ring to overflow
and eat
> its own tail.
> 

Is it this function that prevents this tail-eating?

bool domain_can_write(struct connection *conn)
{
        struct xenstore_domain_interface *intf =
conn->domain->interface;
        return ((intf->rsp_prod - intf->rsp_cons) !=
XENSTORE_RING_SIZE);
}

I hope I'm not just too tired to be thinking about this, but wouldn't
that only return FALSE when the ring was full? It doesn't guarantee that
there is enough space to write a message, and doesn't stop messages
continuing to be written once the ring has overflowed. I can't seen any
other relevant reference to rsp_prod or rsp_cons in xenstored.

James

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