From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Xu Subject: Re: [PATCH v3 10/10] migration: show the statistics of compression Date: Thu, 9 Aug 2018 11:34:32 +0800 Message-ID: <20180809033432.GA2539@xz-mi> References: <20180807091209.13531-1-xiaoguangrong@tencent.com> <20180807091209.13531-11-xiaoguangrong@tencent.com> <20180808061230.GI24415@xz-mi> <40696b07-5663-5c6d-28a6-7d354f0e45cb@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: kvm@vger.kernel.org, mst@redhat.com, mtosatti@redhat.com, Xiao Guangrong , dgilbert@redhat.com, qemu-devel@nongnu.org, wei.w.wang@intel.com, jiang.biao2@zte.com.cn, pbonzini@redhat.com To: Xiao Guangrong Return-path: Content-Disposition: inline In-Reply-To: <40696b07-5663-5c6d-28a6-7d354f0e45cb@gmail.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 On Thu, Aug 09, 2018 at 11:13:17AM +0800, Xiao Guangrong wrote: > > > On 08/08/2018 02:12 PM, Peter Xu wrote: > > On Tue, Aug 07, 2018 at 05:12:09PM +0800, guangrong.xiao@gmail.com wrote: > > > > [...] > > > > > @@ -1602,6 +1614,26 @@ static void migration_update_rates(RAMState *rs, int64_t end_time) > > > rs->xbzrle_cache_miss_prev) / page_count; > > > rs->xbzrle_cache_miss_prev = xbzrle_counters.cache_miss; > > > } > > > + > > > + if (migrate_use_compression()) { > > > + compression_counters.busy_rate = (double)(compression_counters.busy - > > > + rs->compress_thread_busy_prev) / page_count; > > > > So this is related to the previous patch - I still doubt its > > correctness if page_count is the host pages count rather than the > > guest pages'. Other than that the patch looks good to me. > > I think i can treat it as your Reviewed-by boldly. :) Yes, please do. :) Regards, -- Peter Xu