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