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

Re: [Xen-devel] [PATCH] Fix xm save timeout with paused domains


  • To: <john.levon@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: Keir Fraser <keir@xxxxxxxxxxxxx>
  • Date: Tue, 08 May 2007 17:15:42 +0100
  • Delivery-date: Tue, 08 May 2007 09:14:23 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AceRjB/mXr6ebP1/EduQdAAX8io7RQ==
  • Thread-topic: [Xen-devel] [PATCH] Fix xm save timeout with paused domains

How about just not pausing a domain that you're going to save?

 -- Keir

On 8/5/07 17:05, "john.levon@xxxxxxx" <john.levon@xxxxxxx> wrote:

> # HG changeset patch
> # User john.levon@xxxxxxx
> # 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 <max.zhen@xxxxxxx>
> 
> 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@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel


_______________________________________________
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®.