From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yang Hongyang Subject: Re: [PATCH v6 COLO 02/15] secondary vm suspend/resume/checkpoint code Date: Mon, 15 Jun 2015 10:10:52 +0800 Message-ID: <557E342C.9020007@cn.fujitsu.com> References: <1433735159-26739-1-git-send-email-yanghy@cn.fujitsu.com> <1433735159-26739-3-git-send-email-yanghy@cn.fujitsu.com> <20150612142334.GS14606@zion.uk.xensource.com> <21882.61946.360624.328694@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <21882.61946.360624.328694@mariner.uk.xensource.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: Ian Jackson , Wei Liu Cc: ian.campbell@citrix.com, wency@cn.fujitsu.com, andrew.cooper3@citrix.com, yunhong.jiang@intel.com, eddie.dong@intel.com, xen-devel@lists.xen.org, guijianfeng@cn.fujitsu.com, rshriram@cs.ubc.ca List-Id: xen-devel@lists.xenproject.org Hi Ian J, Wei, On 06/12/2015 10:51 PM, Ian Jackson wrote: > Wei Liu writes ("Re: [Xen-devel] [PATCH v6 COLO 02/15] secondary vm suspend/resume/checkpoint code"): >> On Mon, Jun 08, 2015 at 11:45:46AM +0800, Yang Hongyang wrote: >>> From: Wen Congyang >>> + crcs->status = LIBXL_COLO_RESUMED; >>> + >>> + /* avoid calling libxl__xc_domain_restore_done() more than once */ >>> + if (crs->saved_cb) { >>> + dcs->callback = crs->saved_cb; >>> + crs->saved_cb = NULL; >> >> I have a feeling that this trick should be avoided. But I'm not an >> expert on this so I will defer judgement to Ian J. > > Yes, this trick should be avoided. It will make the resulting > control flow very confusing. I agree that this part is a bit of tricky. I will try to find another way to do this. Maybe add another state variable to indicate what stage we are in, the first boot or under checkpoint. > > Ian. > . > -- Thanks, Yang.