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

[Xen-devel] Re: [PATCH][ioemu] Ignore the first watch fire in xenstore_p

To: "Cui, Dexuan" <dexuan.cui@xxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH][ioemu] Ignore the first watch fire in xenstore_process_dm_command_event()
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Tue, 16 Jun 2009 18:23:35 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <Keir.Fraser@xxxxxxxxxxxxx>, Simon Horman <horms@xxxxxxxxxxxx>
Delivery-date: Tue, 16 Jun 2009 10:24:15 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <EADF0A36011179459010BDF5142A457501C9D98D00@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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: <EADF0A36011179459010BDF5142A457501C9D98D00@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Cui, Dexuan writes ("[PATCH][ioemu] Ignore the first watch fire in 
xenstore_process_dm_command_event()"):
> After changeset 19679: ec2bc4b9fa32 (xend: hot-plug PCI devices at
> boot-time) and the related ioemu commits, I notice there is a race
> condition that could break the device assignment of hvm guest.
...
> A straightforward thought is: we can ignore the first watch
> fire. Please see the below patch.

I don't think this can possibly be right.  xenstore watches are cues
to read the path at which the watch has fired, but number of watch
firings is not conserved.  So the actual watch processing code should
be idempotent.

When we start processing a command we should either (i) delete it from
xenstore immediately, so that future watch triggerings either don't
see the command or actually see genuine new invocations, or (ii) make
a note that we're processing the command and arrange not to reprocess
it until something (us or xend, probably) has deleted it.

I'm not sure exactly how the protocol works here ...

Ian.

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