[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 12 of 14 v4] libxl: set frontend status to 6 on domain destroy
2011/12/13 Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>: > Roger Pau Monne writes ("[Xen-devel] [PATCH 12 of 14 v4] libxl: set frontend > status to 6 on domain destroy"): >> libxl: set frontend status to 6 on domain destroy >> >> Set frontend status to 6 on domain destruction and wait for devices to >> be disconnected before executing hotplug scripts. > > There seems to be a race here. > >> + Â Âlibxl__xs_write(gc, XBT_NULL, libxl__sprintf(gc, "%s/%s", fe_path, >> "state"), "6"); > > So here, the kernel or backendd start racing, and you hope that they > win the race and close the device before ... From my experience in NetBSD, the kernel only closes the device when it's frontend state is set to 6, since we destroy the domain, it is unable to set the status to 6, and thus the kernel doesn't detach the devices. I've added some libxl__wait_for_device_state logic here, to assure the backend state is set to 6 before trying to execute hotplug scripts. The truth is that I had it in previous versions of my patch, but it seems the kernel always switches contexts and detaches the devices before executing hotplug scripts (it might just be luck). Also this patch speeds domain destruction a lot (which is also quite slow under Linux from what I saw). >> Â Â Âlibxl__device_execute_hotplug(gc, dev, DISCONNECT); > > ... the hotplug script tries to remove it. > > Is there something we can do to make sure that we always get this > right ? > > Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |