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: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: [Xen-devel] RE: [PATCH][ioemu] Ignore the first watch fire in xenstore_process_dm_command_event()
From: "Cui, Dexuan" <dexuan.cui@xxxxxxxxx>
Date: Wed, 17 Jun 2009 01:33:24 +0800
Accept-language: zh-CN, en-US
Acceptlanguage: zh-CN, en-US
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <Keir.Fraser@xxxxxxxxxxxxx>, Simon Horman <horms@xxxxxxxxxxxx>
Delivery-date: Tue, 16 Jun 2009 10:34:31 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <18999.54551.711286.625101@xxxxxxxxxxxxxxxxxxxxxxxx>
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> <18999.54551.711286.625101@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcnupzU4ux09YkYHSUe5B37233/GdAAARZTg
Thread-topic: [PATCH][ioemu] Ignore the first watch fire in xenstore_process_dm_command_event()
Ian Jackson wrote:
> 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, 
Thanks for your suggestion.
I prefer this method. I'll post a new patch.

> 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 ...
> 

Thanks,
-- Dexuan


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