From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v3 COLOPre 01/26] tools/libxl: rename libxl__domain_suspend to libxl__domain_save Date: Mon, 29 Jun 2015 16:43:03 +0100 Message-ID: <1435592583.32500.358.camel@citrix.com> References: <1435213552-10556-1-git-send-email-yanghy@cn.fujitsu.com> <1435213552-10556-2-git-send-email-yanghy@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1435213552-10556-2-git-send-email-yanghy@cn.fujitsu.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Yang Hongyang Cc: wei.liu2@citrix.com, eddie.dong@intel.com, wency@cn.fujitsu.com, andrew.cooper3@citrix.com, yunhong.jiang@intel.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org, guijianfeng@cn.fujitsu.com, rshriram@cs.ubc.ca List-Id: xen-devel@lists.xenproject.org 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 */