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

Re: [Xen-devel] xenstore watches and event queue

On Wed, 2012-02-01 at 12:39 +0000, Roger Pau Monnà wrote:
> Hello,
> I've been having some problems with xs_watch and xs_read_watch, here
> is my scenario:
> xs_watch("/some/xenstore/dir");
> [... do some stuff...]
> xs_read_watch(...);
> [... do some processing ...]
> [... xenstore changes ...]
> xs_read_watch(...);
> If someone modifies the xenstore entries I'm watching, but I'm not
> currently on xs_read_watch, only the last modification is returned
> when I call xs_read_watch, I would expect xenstore watches to have
> some kind of queue, so multiple xenstore changes on watched dirs are
> not lost if I'm not currently blocked on xs_read_watch. Is there
> anyway to archive this?

I think you need to cope with this scenario anyway because even if you
got multiple watches you would need to cope with the fact that while you
were processing the first one the subsequent write would have occurred
and so the value of the key you would see would be the latest value.
Then when you get the second watch there would be no apparent change

So the things you do in reaction to a xenstore watch need to cope with
skipping states if they don't enforce the sequencing via their own


Xen-devel mailing list



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