From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH v6 09/18] tools/libxl: introduce libxl__domain_common_switch_qemu_logdirty() Date: Tue, 26 Jan 2016 09:27:42 -0500 Message-ID: <20160126142742.GA19666@char.us.oracle.com> References: <1451442548-26974-1-git-send-email-wency@cn.fujitsu.com> <1451442548-26974-10-git-send-email-wency@cn.fujitsu.com> <20160125185910.GO14977@char.us.oracle.com> <56A71A87.5010007@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <56A71A87.5010007@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: Wen Congyang Cc: Lars Kurth , Changlong Xie , Wei Liu , Ian Campbell , Andrew Cooper , Jiang Yunhong , Ian Jackson , xen devel , Dong Eddie , Gui Jianfeng , Shriram Rajagopalan , Yang Hongyang List-Id: xen-devel@lists.xenproject.org On Tue, Jan 26, 2016 at 03:04:39PM +0800, Wen Congyang wrote: > On 01/26/2016 02:59 AM, Konrad Rzeszutek Wilk wrote: > > On Wed, Dec 30, 2015 at 10:28:59AM +0800, Wen Congyang wrote: > >> Secondary vm is running in colo mode, we need to send > >> secondary vm's dirty page information to master at checkpoint, > > > > In previous patch you called it primary, so perhaps: > > s/master/primary/ ? > > > >> so we have to enable qemu logdirty on secondary. > >> > >> libxl__domain_suspend_common_switch_qemu_logdirty() is to enable > >> qemu logdirty. But it uses domain_save_state, and calls > > > > s/domain_save_state/libxl__domain_save_state/ > >> libxl__xc_domain_saverestore_async_callback_done() > >> before exits. This can not be used for secondary vm. > >> > >> Update libxl__domain_suspend_common_switch_qemu_logdirty() to > >> introduce a new API libxl__domain_common_switch_qemu_logdirty(). > >> This API only uses libxl__logdirty_switch, and calls > >> lds->callback before exits. > > > > One question - that perhaps had been part of the review earlier > > (if so it may be good to include this in the description > > so I don't ask silly questions): > > > > Why add this extra API? You could squash libxl__domain_suspend_common_switch_qemu_logdirty > > and libxl__domain_common_switch_qemu_logdirty code together > > and call it libxl_domain_common_and_suspend_common_switch_qemu_logdirty > > (ok, just kidding on the name). But - why not have one function > > instead of splitting the functionality in two? > > Do you mean that auto switch qemu logdirty when suspend the guest? Squash the two functions - libxl__domain_common_switch_qemu_logdirty and libxl__domain_suspend_common_switch_qemu_logdirty together?