From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yang Hongyang Subject: Re: [PATCH Remus v6 1/3] libxc/save: refactor of send_domain_memory_live() Date: Mon, 18 May 2015 08:53:45 +0800 Message-ID: <55593819.8010105@cn.fujitsu.com> References: <1431685025-16809-1-git-send-email-yanghy@cn.fujitsu.com> <1431685025-16809-2-git-send-email-yanghy@cn.fujitsu.com> <5555ECF1.1030001@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5555ECF1.1030001@citrix.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: Andrew Cooper , xen-devel@lists.xen.org Cc: wei.liu2@citrix.com, ian.campbell@citrix.com, wency@cn.fujitsu.com, ian.jackson@eu.citrix.com, yunhong.jiang@intel.com, eddie.dong@intel.com, guijianfeng@cn.fujitsu.com, rshriram@cs.ubc.ca List-Id: xen-devel@lists.xenproject.org On 05/15/2015 08:56 PM, Andrew Cooper wrote: > On 15/05/15 11:17, Yang Hongyang wrote: >> @@ -519,9 +533,15 @@ static int send_domain_memory_live(struct xc_sr_context *ctx) >> goto out; >> } >> >> - rc = update_progress_string(ctx, &progress_str, ctx->save.max_iterations); >> - if ( rc ) >> - goto out; >> + if ( ctx->save.live ) >> + { >> + rc = update_progress_string(ctx, &progress_str, >> + ctx->save.max_iterations); >> + if ( rc ) >> + goto out; >> + } >> + else >> + xc_set_progress_prefix(xch, "Checkpointed save"); >> >> bitmap_or(dirty_bitmap, ctx->save.deferred_pages, ctx->save.p2m_size); > > Sorry not to notice this before, but you want to clear the > deferred_pages map (and count) after the subsequent call to > send_dirty_pages(). > > deferred_pages accumulates during the live phase (for grant mapped > pages, pagetables in flux, etc), but should be empty an unused during > checkpoints. At the moment, this is causing each checkpoint to send > more data than they need to. Ah, it won't cause error in the test, so I missed this part, good catch, thank you! > > For the rest of the refactoring, Reviewed-by: Andrew Cooper > > . > -- Thanks, Yang.