From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Dr. David Alan Gilbert" Subject: Re: [PATCH 02/12] migration: fix counting normal page for compression Date: Wed, 13 Jun 2018 16:51:48 +0100 Message-ID: <20180613155147.GJ2676@work-vm> References: <20180604095520.8563-1-xiaoguangrong@tencent.com> <20180604095520.8563-3-xiaoguangrong@tencent.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, mst@redhat.com, mtosatti@redhat.com, Xiao Guangrong , qemu-devel@nongnu.org, peterx@redhat.com, wei.w.wang@intel.com, jiang.biao2@zte.com.cn, pbonzini@redhat.com To: guangrong.xiao@gmail.com Return-path: Content-Disposition: inline In-Reply-To: <20180604095520.8563-3-xiaoguangrong@tencent.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel2=m.gmane.org@nongnu.org Sender: "Qemu-devel" List-Id: kvm.vger.kernel.org * guangrong.xiao@gmail.com (guangrong.xiao@gmail.com) wrote: > From: Xiao Guangrong > > The compressed page is not normal page Is this the right reason? I think we always increment some counter for a page - so what gets incremented for a compressed page? Is the real answer that we do: ram_save_target_page control_save_page compress_page_with_multi_thread and control_save_page already increments the counter? Dave > Signed-off-by: Xiao Guangrong > --- > migration/ram.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/migration/ram.c b/migration/ram.c > index 0caf32ab0a..dbf24d8c87 100644 > --- a/migration/ram.c > +++ b/migration/ram.c > @@ -1432,7 +1432,6 @@ static int compress_page_with_multi_thread(RAMState *rs, RAMBlock *block, > qemu_cond_signal(&comp_param[idx].cond); > qemu_mutex_unlock(&comp_param[idx].mutex); > pages = 1; > - ram_counters.normal++; > ram_counters.transferred += bytes_xmit; > break; > } > -- > 2.14.4 > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK