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-ia64-devel

[Xen-ia64-devel] [PATCH] xc_domain_save: Do not poll-wait for guest to s

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [PATCH] xc_domain_save: Do not poll-wait for guest to shutdown.
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Fri, 19 Sep 2008 11:57:20 +0900
Delivery-date: Thu, 18 Sep 2008 19:57:33 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.6i
[IA64] xc_domain_save: Do not poll-wait for guest to shutdown.

This patch is ia64 counter part of 18452:59904b180078.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>

diff -r b480c0d22b4e tools/libxc/ia64/xc_ia64_linux_save.c
--- a/tools/libxc/ia64/xc_ia64_linux_save.c     Thu Sep 18 19:49:38 2008 +0900
+++ b/tools/libxc/ia64/xc_ia64_linux_save.c     Fri Sep 19 11:47:25 2008 +0900
@@ -56,43 +56,18 @@
 suspend_and_state(int (*suspend)(void), int xc_handle, int io_fd,
                   int dom, xc_dominfo_t *info)
 {
-    int i = 0;
-
     if (!(*suspend)()) {
         ERROR("Suspend request failed");
         return -1;
     }
 
-retry:
-
-    if (xc_domain_getinfo(xc_handle, dom, 1, info) != 1) {
+    if ( (xc_domain_getinfo(xc_handle, dom, 1, info) != 1) ||
+         !info->shutdown || (info->shutdown_reason != SHUTDOWN_suspend) ) {
         ERROR("Could not get domain info");
         return -1;
     }
 
-    if (info->shutdown && info->shutdown_reason == SHUTDOWN_suspend)
-        return 0; // success
-
-    if (info->paused) {
-        // try unpausing domain, wait, and retest
-        xc_domain_unpause(xc_handle, dom);
-
-        ERROR("Domain was paused. Wait and re-test.");
-        usleep(10000);  // 10ms
-
-        goto retry;
-    }
-
-
-    if(++i < 100) {
-        ERROR("Retry suspend domain.");
-        usleep(10000);  // 10ms
-        goto retry;
-    }
-
-    ERROR("Unable to suspend domain.");
-
-    return -1;
+    return 0;
 }
 
 static inline int


-- 
yamahata

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-ia64-devel] [PATCH] xc_domain_save: Do not poll-wait for guest to shutdown., Isaku Yamahata <=