On Thu, 2015-06-25 at 14:25 +0800, Yang Hongyang wrote:
> Rename libxl__domain_suspend() to libxl__domain_save() since it
> actually do the save domain work.

In response to Ian J's query on the last version Andrew said:
        
        The terminology used by libxc is more consistent in this area.
        
        "suspend" refers to quiescing the VM, so pausing qemu, making a
        remote_shutdown(SHUTDOWN_suspend) hypercall etc.
        
        "save" refers to the actions involved in actually shuffling the
        state of the VM, so xc_domain_save() etc.
        
        I believe that these are useful distinctions to maintain.  libxl
        currently uses "suspend" to encapsulate both.

Are your changes here staying true to those definitions?

I think incorporating some of that (in particular the second and third
paragraphs) into a code comment somewhere (likely libxl_internal.h)
would make it much clearer why you were doing this, and give people like
me a reminder of the distinction each time they trip over it in this
series too.


> diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
> index e0f6e09..19ebaab 100644
> --- a/tools/libxl/libxl_internal.h
> +++ b/tools/libxl/libxl_internal.h
> @@ -3264,8 +3264,8 @@ struct libxl__domain_create_state {
>  /*----- Domain suspend (save) functions -----*/

... here might be a good place to explain why/how suspend and save are
different.

>  
>  /* calls dss->callback when done */
> -_hidden void libxl__domain_suspend(libxl__egc *egc,
> -                                   libxl__domain_suspend_state *dss);
> +_hidden void libxl__domain_save(libxl__egc *egc,
> +                                libxl__domain_suspend_state *dss);
>  
> 
>  /* calls libxl__xc_domain_suspend_done when done */



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to