From: Keir Fraser Subject: Re: [PATCH] Fix xm save timeout with paused domains Date: Tue, 08 May 2007 17:15:42 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: john.levon@sun.com, xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org How about just not pausing a domain that you're going to save? -- Keir On 8/5/07 17:05, "john.levon@sun.com" wrote: > # HG changeset patch > # User john.levon@sun.com > # Date 1178640308 25200 > # Node ID eee26efa7fad6ff7ba9ab43dfec82995e9df4653 > # Parent 62709adfbeec35215e97f7dbe0ab64c704fca26d > Fix xm save timeout with paused domains. > > Don't start migrating a domU before it's unpaused. > > Signed-off-by: Max Zhen > > diff --git a/tools/libxc/xc_domain_save.c b/tools/libxc/xc_domain_save.c > --- a/tools/libxc/xc_domain_save.c > +++ b/tools/libxc/xc_domain_save.c > @@ -454,14 +454,26 @@ static void *map_frame_list_list(int xc_ > shared_info_t *shinfo) > { > int count = 100; > + int paused = 1; > + xc_dominfo_t info; > void *p; > > - while ( count-- && (shinfo->arch.pfn_to_mfn_frame_list_list == 0) ) > + while ( count && (shinfo->arch.pfn_to_mfn_frame_list_list == 0) ) > + { > + if (paused && xc_domain_getinfo(xc_handle, dom, 1, &info) != 1) > + { > + ERROR("Could not get domain info"); > + return NULL; > + } > + paused = info.paused; > + if (!paused) > + count--; /* start the counter only after dom is unpaused */ > usleep(10000); > + } > > if ( shinfo->arch.pfn_to_mfn_frame_list_list == 0 ) > { > - ERROR("Timed out waiting for frame list updated."); > + ERROR("Timed out waiting for frame list update."); > return NULL; > } > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel