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

Re: [Xen-devel] Not waiting for devices in xend when resuming a domain




Keir Fraser <Keir.Fraser@xxxxxxxxxxxx> wrote on 09/23/2006 12:31:37 PM:

>
>
>
> On 23/9/06 5:31 pm, "Stefan Berger" <stefanb@xxxxxxxxxx> wrote:

> I noticed that if a domain is resumed it is NOT being waited for the
> hotplug scripts to finish running (call to waitForDevices in xend) ,
> like this is for example done when a domain is starting. If I put a
> lot of load on domain-0 by for example compiling the sources with
> multiple threads (make -j 16) and do a resume on a domain, this can
> lead to access to devices although they are not properly connected,
> yet. I think it's even more critical to have immediate and
> guaranteed access to all devices when a domain is immediately
> available (resume) and if it wants to access a device instead of it
> the case when it might be busy spending some time booting.

>
> They at least need to be set up enough that the restored domain can
> start connecting to its new backends. So the backend info directory
> needs to be set up by the time the domain resumes execution.
>


This one-line patch here syncs with the state of the hotplug scrtips before resuming the domain. It's done as late as possible so in many cases no waiting for the scripts is actually necessary.

diff -r c4f3f719d997 tools/python/xen/xend/XendCheckpoint.py
--- a/tools/python/xen/xend/XendCheckpoint.py                 Sat Sep 23 13:54:58 2006
+++ b/tools/python/xen/xend/XendCheckpoint.py                 Sat Sep 23 15:10:17 2006
@@ -163,6 +163,7 @@

        #Block until src closes connection
        os.read(fd, 1)
+        dominfo.waitForDevices()
        dominfo.unpause()
       
        dominfo.completeRestore(handler.store_mfn, handler.console_mfn)


>  -- Keir


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

 


Rackspace

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