WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] Not waiting for devices in xend when resuming a domain
From: Stefan Berger <stefanb@xxxxxxxxxx>
Date: Sat, 23 Sep 2006 16:20:43 -0400
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Sat, 23 Sep 2006 13:21:11 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C13B1FF9.1A87%Keir.Fraser@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

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
<Prev in Thread] Current Thread [Next in Thread>