[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH 4 of 6] libxl: support suspend_cancel in	domain_resume
 
 
On Tue, Jan 31, 2012 at 2:00 AM, Ian Campbell  <Ian.Campbell@xxxxxxxxxx> wrote: 
On Tue, 2012-01-31 at 01:05 +0000,  rshriram@xxxxxxxxx wrote:Please can you add a few words about what fast means and when its use  
would be appropriate. 
 
I'm not sure fast is right word -- it happens that this mechanism is 
faster but isn't the real meaning "co-operative" or something along 
those lines? 
 
Would a better name be libxl_domain_suspend_cancel, sharing a common 
helper internally with libxl_domain_resume? 
   The explanation is already there, on top of xc_domain_resume in libxc. fast suspend - hvm guest checks for the return code of the shutdown call. If it returns 1, 
  then it just resumes, else shuts down. (similar case for PV guest)
  if fast = 0, then the guest is led to believe that it is resuming in a new host (ie wakeup from hibernate sorts).   As for guests supporting this fast suspend, almost all guests (pv/hvm linux/windows)  
do support suspend_cancel. IIRC, I think some very old kernels didnt have this ability.
 
 
 
 
Ian. 
 
>  int libxl_domain_shutdown(libxl_ctx *ctx, uint32_t domid); 
>  int libxl_domain_reboot(libxl_ctx *ctx, uint32_t domid); 
>  int libxl_domain_destroy(libxl_ctx *ctx, uint32_t domid); 
> diff -r cd3d43d88c05 -r efe92d80c474 tools/libxl/xl_cmdimpl.c 
> --- a/tools/libxl/xl_cmdimpl.c        Mon Jan 30 16:58:31 2012 -0800 
> +++ b/tools/libxl/xl_cmdimpl.c        Mon Jan 30 16:58:47 2012 -0800 
> @@ -2751,7 +2751,7 @@ static void migrate_domain(const char *d 
>          if (common_domname) { 
>              libxl_domain_rename(ctx, domid, away_domname, common_domname); 
>          } 
> -        rc = libxl_domain_resume(ctx, domid); 
> +        rc = libxl_domain_resume(ctx, domid, 1); 
>          if (!rc) fprintf(stderr, "migration sender: Resumed OK.\n"); 
> 
>          fprintf(stderr, "Migration failed due to problems at target.\n"); 
> @@ -2773,7 +2773,7 @@ static void migrate_domain(const char *d 
>      close(send_fd); 
>      migration_child_report(child, recv_fd); 
>      fprintf(stderr, "Migration failed, resuming at sender.\n"); 
> -    libxl_domain_resume(ctx, domid); 
> +    libxl_domain_resume(ctx, domid, 1); 
>      exit(-ERROR_FAIL); 
> 
>   failed_badly: 
 
 
   
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
 
 
    
     |