From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: Re: [PATCH v1 03/10] libxl: store a copy of vanilla domain configuration when creating domain Date: Thu, 17 Jul 2014 12:46:25 +0100 Message-ID: <20140717114625.GI4913@zion.uk.xensource.com> References: <1405002745-5034-1-git-send-email-wei.liu2@citrix.com> <1405002745-5034-4-git-send-email-wei.liu2@citrix.com> <1405527488.1087.60.camel@kazak.uk.xensource.com> <20140716164730.GC4913@zion.uk.xensource.com> <1405595208.12538.18.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1405595208.12538.18.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: ian.jackson@eu.citrix.com, Wei Liu , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Thu, Jul 17, 2014 at 12:06:48PM +0100, Ian Campbell wrote: [...] > Either works for me. > > > And for larger scope, when creating a domain, there shouldn't be any > > other thread trying to access the configuration file (is there?), so > > locking is not necessary. > > Could someone race and try and call xl mem-set in the middle of the > create? Not sure. > Good point. To be clear, we don't really care about those moving parts in xenstore, as we always read from xenstore later to get the latest value. What concerns me is user doing "xl XXX-attach" etc before the config is stored. > Always taking the lock when manipulating a domain's stored config, even > if it isn't strictly necessary means we don't need to think to hard > about those corner cases... > > I suppose there is also a brief interval after the createdomain domctl > where the domid is "valid" but no config has been stored yet (since the > create doesn't hold the lock, I think). You might need some robustness > against that too. > I think you're right. Wei. > Ian.