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

Re: [Xen-devel] [PATCH v3 COLOPre 01/26] tools/libxl: rename libxl__domain_suspend to libxl__domain_save





On 06/29/2015 11:43 PM, Ian Campbell wrote:
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.

Ok, will make the comment above into a code comment in the next version.



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 */


.


--
Thanks,
Yang.

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.