From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH Remus v6 1/3] libxc/save: refactor of send_domain_memory_live() Date: Fri, 15 May 2015 13:56:17 +0100 Message-ID: <5555ECF1.1030001@citrix.com> References: <1431685025-16809-1-git-send-email-yanghy@cn.fujitsu.com> <1431685025-16809-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: <1431685025-16809-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 , 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 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. For the rest of the refactoring, Reviewed-by: Andrew Cooper