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

Re: [Xen-devel] Xenstore watch interface in the kernel



Sander Eikelenboom writes ("Re: [Xen-devel] Xenstore watch interface in the 
kernel"):
> Something I did ran into while trying to use xenstore, was that the
> callbacks don't give back the previous and current value.

Others have replied to this, and I agree with them, but: this makes me
think you are probably writing an incorrect algorithm or state
machine.

The correct way to use a xenstore watch is to treat it a bit like an
interrupt: your code should use it as a prompt to read the value(s) it
cares about.  (In a transaction, if multiple reads are needed.)

The update, which reads the xenstore keys and "makes it so", should be
idempotent.

Obviously your code needs to keep track of what situation it currently
implements, anyway.  So you shouldn't need to explicitly retain the
previous xenstore contents.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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