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

Re: [Xen-devel] [PATCH v1 12/12] libxl: add device backend listener in order to launch backends



Roger Pau Monné writes ("Re: [PATCH v1 12/12] libxl: add device backend 
listener in order to launch backends"):
> On 04/11/13 18:20, Ian Jackson wrote:
> > But what you actually do is call initiate_device_remove and then
> > return - ie, you return to the event loop.  That gives up the lock,
> > obviously.  So while the device removal is proceeding, other events
> > can occur.
> > 
> > If backend_watch_callback happens then, I think you may find that it
> > seems num_*==0 and decides to tear down the state for that domain.
> 
> The cleanup for the domain already happened, after we decrement num_* we
> return to the main backend_watch_callback (all holding the Big Lock),
> and libxl proceeds with the removal of the libxl__ddomain_guest if
> sum(num_*) == 0.

Ah, yes.  So the teardown of the domain tracking structure happens
right away.  The device removal callback happens after libxl has
forgotten about the domain.

> device_complete doesn't make use of either libxl__ddomain_device or
> libxl__ddomain_guest, during normal program flow device_complete will be
> called with both of the above data structures already freed.

Yes.  Mind you, in the future, if we get better error handling, this
is going to have to be redone.

But you've convinced me it's OK for now.

Ian.

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


 


Rackspace

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