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

Re: [Xen-devel] [PATCH v1 03/10] libxl: store a copy of vanilla domain configuration when creating domain

On Fri, Jul 25, 2014 at 04:01:06PM +0100, Ian Jackson wrote:
> > > > +    /* update network interface information */
> ...
> > > Does creating the config early, and then updating it, not mean that
> > > there will be a window during domain creation when configuration
> > > exists but lacks these updates ?
> > > 
> > > I think that might be a (theoretically application-visible) bug.
> > 
> > Yes, there's such windows.
> > 
> > Ian C suggested I add lock during creation, which I think should fix
> > this problem.
> I don't think that's a particularly good idea.  Such a lock would
> presumably cover most of the domain creation work (hotplug scripts
> etc) which might take a long time.
> During that time various operations would block unreasonably.

That's a bit unfortunate. But what can we do to close that window?
I think no good will come out if I try to fiddle with domain state
during creation anyway, so locking like this may be acceptable?

> Also, I think you mustn't use an fcntl lock across ao operation
> callback chains.  fcntl locks do not exclude other threads in the same
> process.

Then we need both mutex and file lock? Mutex to protect against threads
in the same process while file lock protect against other processes.


Xen-devel mailing list



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