From: "Dr. David Alan Gilbert" <dgilbert@redhat.com> To: Xiao Guangrong <guangrong.xiao@gmail.com> Cc: kvm@vger.kernel.org, mst@redhat.com, mtosatti@redhat.com, Xiao Guangrong <xiaoguangrong@tencent.com>, qemu-devel@nongnu.org, peterx@redhat.com, wei.w.wang@intel.com, jiang.biao2@zte.com.cn, pbonzini@redhat.com Subject: Re: [PATCH 05/12] migration: show the statistics of compression Date: Mon, 16 Jul 2018 20:01:22 +0100 [thread overview] Message-ID: <20180716190122.GE2664@work-vm> (raw) In-Reply-To: <b64e1091-7fe4-fe65-4b28-2597491993e1@gmail.com> * Xiao Guangrong (guangrong.xiao@gmail.com) wrote: > > > On 06/14/2018 12:25 AM, Dr. David Alan Gilbert wrote: > } > > > static void migration_bitmap_sync(RAMState *rs) > > > @@ -1412,6 +1441,9 @@ static void flush_compressed_data(RAMState *rs) > > > qemu_mutex_lock(&comp_param[idx].mutex); > > > if (!comp_param[idx].quit) { > > > len = qemu_put_qemu_file(rs->f, comp_param[idx].file); > > > + /* 8 means a header with RAM_SAVE_FLAG_CONTINUE. */ > > > + compression_counters.reduced_size += TARGET_PAGE_SIZE - len + 8; > > > > I think I'd rather save just len+8 rather than than the subtraction. > > > Hmmmmmm, is this what you want? > compression_counters.reduced_size += len - 8; > > Then calculate the real reduced size in populate_ram_info() where we return this > info to the user: > info->compression->reduced_size = compression_counters.pages * PAGE_SIZE - compression_counters.reduced_size; > > Right? I mean I'd rather see the actual size presented to the user rather than the saving compared to uncompressed. Dave > > I think other than that, and Eric's comments, it's OK. > > > > Thanks. -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
WARNING: multiple messages have this Message-ID (diff)
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com> To: Xiao Guangrong <guangrong.xiao@gmail.com> Cc: pbonzini@redhat.com, mst@redhat.com, mtosatti@redhat.com, qemu-devel@nongnu.org, kvm@vger.kernel.org, peterx@redhat.com, jiang.biao2@zte.com.cn, wei.w.wang@intel.com, Xiao Guangrong <xiaoguangrong@tencent.com> Subject: Re: [Qemu-devel] [PATCH 05/12] migration: show the statistics of compression Date: Mon, 16 Jul 2018 20:01:22 +0100 [thread overview] Message-ID: <20180716190122.GE2664@work-vm> (raw) In-Reply-To: <b64e1091-7fe4-fe65-4b28-2597491993e1@gmail.com> * Xiao Guangrong (guangrong.xiao@gmail.com) wrote: > > > On 06/14/2018 12:25 AM, Dr. David Alan Gilbert wrote: > } > > > static void migration_bitmap_sync(RAMState *rs) > > > @@ -1412,6 +1441,9 @@ static void flush_compressed_data(RAMState *rs) > > > qemu_mutex_lock(&comp_param[idx].mutex); > > > if (!comp_param[idx].quit) { > > > len = qemu_put_qemu_file(rs->f, comp_param[idx].file); > > > + /* 8 means a header with RAM_SAVE_FLAG_CONTINUE. */ > > > + compression_counters.reduced_size += TARGET_PAGE_SIZE - len + 8; > > > > I think I'd rather save just len+8 rather than than the subtraction. > > > Hmmmmmm, is this what you want? > compression_counters.reduced_size += len - 8; > > Then calculate the real reduced size in populate_ram_info() where we return this > info to the user: > info->compression->reduced_size = compression_counters.pages * PAGE_SIZE - compression_counters.reduced_size; > > Right? I mean I'd rather see the actual size presented to the user rather than the saving compared to uncompressed. Dave > > I think other than that, and Eric's comments, it's OK. > > > > Thanks. -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2018-07-16 19:01 UTC|newest] Thread overview: 156+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-06-04 9:55 [PATCH 00/12] migration: improve multithreads for compression and decompression guangrong.xiao 2018-06-04 9:55 ` [Qemu-devel] " guangrong.xiao 2018-06-04 9:55 ` [PATCH 01/12] migration: do not wait if no free thread guangrong.xiao 2018-06-04 9:55 ` [Qemu-devel] " guangrong.xiao 2018-06-11 7:39 ` Peter Xu 2018-06-11 7:39 ` [Qemu-devel] " Peter Xu 2018-06-12 2:42 ` Xiao Guangrong 2018-06-12 2:42 ` [Qemu-devel] " Xiao Guangrong 2018-06-12 3:15 ` Peter Xu 2018-06-12 3:15 ` [Qemu-devel] " Peter Xu 2018-06-13 15:43 ` Dr. David Alan Gilbert 2018-06-13 15:43 ` [Qemu-devel] " Dr. David Alan Gilbert 2018-06-14 3:19 ` Xiao Guangrong 2018-06-14 3:19 ` [Qemu-devel] " Xiao Guangrong 2018-06-04 9:55 ` [PATCH 02/12] migration: fix counting normal page for compression guangrong.xiao 2018-06-04 9:55 ` [Qemu-devel] " guangrong.xiao 2018-06-13 15:51 ` Dr. David Alan Gilbert 2018-06-13 15:51 ` [Qemu-devel] " Dr. David Alan Gilbert 2018-06-14 3:32 ` Xiao Guangrong 2018-06-14 3:32 ` [Qemu-devel] " Xiao Guangrong 2018-06-04 9:55 ` [PATCH 03/12] migration: fix counting xbzrle cache_miss_rate guangrong.xiao 2018-06-04 9:55 ` [Qemu-devel] " guangrong.xiao 2018-06-13 16:09 ` Dr. David Alan Gilbert 2018-06-13 16:09 ` [Qemu-devel] " Dr. David Alan Gilbert 2018-06-15 11:30 ` Dr. David Alan Gilbert 2018-06-15 11:30 ` [Qemu-devel] " Dr. David Alan Gilbert 2018-06-04 9:55 ` [PATCH 04/12] migration: introduce migration_update_rates guangrong.xiao 2018-06-04 9:55 ` [Qemu-devel] " guangrong.xiao 2018-06-13 16:17 ` Dr. David Alan Gilbert 2018-06-13 16:17 ` [Qemu-devel] " Dr. David Alan Gilbert 2018-06-14 3:35 ` Xiao Guangrong 2018-06-14 3:35 ` [Qemu-devel] " Xiao Guangrong 2018-06-15 11:32 ` Dr. David Alan Gilbert 2018-06-15 11:32 ` [Qemu-devel] " Dr. David Alan Gilbert 2018-06-04 9:55 ` [PATCH 05/12] migration: show the statistics of compression guangrong.xiao 2018-06-04 9:55 ` [Qemu-devel] " guangrong.xiao 2018-06-04 22:31 ` Eric Blake 2018-06-04 22:31 ` [Qemu-devel] " Eric Blake 2018-06-06 12:44 ` Xiao Guangrong 2018-06-06 12:44 ` [Qemu-devel] " Xiao Guangrong 2018-06-13 16:25 ` Dr. David Alan Gilbert 2018-06-13 16:25 ` [Qemu-devel] " Dr. David Alan Gilbert 2018-06-14 6:48 ` Xiao Guangrong 2018-06-14 6:48 ` [Qemu-devel] " Xiao Guangrong 2018-07-16 19:01 ` Dr. David Alan Gilbert [this message] 2018-07-16 19:01 ` Dr. David Alan Gilbert 2018-07-18 8:51 ` Xiao Guangrong 2018-07-18 8:51 ` [Qemu-devel] " Xiao Guangrong 2018-06-04 9:55 ` [PATCH 06/12] migration: do not detect zero page for compression guangrong.xiao 2018-06-04 9:55 ` [Qemu-devel] " guangrong.xiao 2018-06-19 7:30 ` Peter Xu 2018-06-19 7:30 ` [Qemu-devel] " Peter Xu 2018-06-28 9:12 ` Xiao Guangrong 2018-06-28 9:12 ` [Qemu-devel] " Xiao Guangrong 2018-06-28 9:36 ` Daniel P. Berrangé 2018-06-28 9:36 ` [Qemu-devel] " Daniel P. Berrangé 2018-06-29 3:50 ` Xiao Guangrong 2018-06-29 3:50 ` [Qemu-devel] " Xiao Guangrong 2018-06-29 9:54 ` Dr. David Alan Gilbert 2018-06-29 9:54 ` [Qemu-devel] " Dr. David Alan Gilbert 2018-06-29 9:42 ` Dr. David Alan Gilbert 2018-06-29 9:42 ` [Qemu-devel] " Dr. David Alan Gilbert 2018-07-03 3:53 ` Xiao Guangrong 2018-07-03 3:53 ` [Qemu-devel] " Xiao Guangrong 2018-07-16 18:58 ` Dr. David Alan Gilbert 2018-07-16 18:58 ` [Qemu-devel] " Dr. David Alan Gilbert 2018-07-18 8:46 ` Xiao Guangrong 2018-07-18 8:46 ` [Qemu-devel] " Xiao Guangrong 2018-07-22 16:05 ` Michael S. Tsirkin 2018-07-22 16:05 ` [Qemu-devel] " Michael S. Tsirkin 2018-07-23 7:12 ` Xiao Guangrong 2018-07-23 7:12 ` [Qemu-devel] " Xiao Guangrong 2018-06-04 9:55 ` [PATCH 07/12] migration: hold the lock only if it is really needed guangrong.xiao 2018-06-04 9:55 ` [Qemu-devel] " guangrong.xiao 2018-06-19 7:36 ` Peter Xu 2018-06-19 7:36 ` [Qemu-devel] " Peter Xu 2018-06-28 9:33 ` Xiao Guangrong 2018-06-28 9:33 ` [Qemu-devel] " Xiao Guangrong 2018-06-29 11:22 ` Dr. David Alan Gilbert 2018-06-29 11:22 ` [Qemu-devel] " Dr. David Alan Gilbert 2018-07-03 6:27 ` Xiao Guangrong 2018-07-03 6:27 ` [Qemu-devel] " Xiao Guangrong 2018-07-11 8:21 ` Peter Xu 2018-07-11 8:21 ` [Qemu-devel] " Peter Xu 2018-07-12 7:47 ` Xiao Guangrong 2018-07-12 7:47 ` [Qemu-devel] " Xiao Guangrong 2018-07-12 8:26 ` Peter Xu 2018-07-12 8:26 ` [Qemu-devel] " Peter Xu 2018-07-18 8:56 ` Xiao Guangrong 2018-07-18 8:56 ` [Qemu-devel] " Xiao Guangrong 2018-07-18 10:18 ` Peter Xu 2018-07-18 10:18 ` [Qemu-devel] " Peter Xu 2018-07-13 17:44 ` Dr. David Alan Gilbert 2018-07-13 17:44 ` [Qemu-devel] " Dr. David Alan Gilbert 2018-06-04 9:55 ` [PATCH 08/12] migration: do not flush_compressed_data at the end of each iteration guangrong.xiao 2018-06-04 9:55 ` [Qemu-devel] " guangrong.xiao 2018-07-13 18:01 ` Dr. David Alan Gilbert 2018-07-13 18:01 ` [Qemu-devel] " Dr. David Alan Gilbert 2018-07-18 8:44 ` Xiao Guangrong 2018-07-18 8:44 ` [Qemu-devel] " Xiao Guangrong 2018-06-04 9:55 ` [PATCH 09/12] ring: introduce lockless ring buffer guangrong.xiao 2018-06-04 9:55 ` [Qemu-devel] " guangrong.xiao 2018-06-20 4:52 ` Peter Xu 2018-06-20 4:52 ` [Qemu-devel] " Peter Xu 2018-06-28 10:02 ` Xiao Guangrong 2018-06-28 10:02 ` [Qemu-devel] " Xiao Guangrong 2018-06-28 11:55 ` Wei Wang 2018-06-28 11:55 ` [Qemu-devel] " Wei Wang 2018-06-29 3:55 ` Xiao Guangrong 2018-06-29 3:55 ` [Qemu-devel] " Xiao Guangrong 2018-07-03 15:55 ` Paul E. McKenney 2018-07-03 15:55 ` [Qemu-devel] " Paul E. McKenney 2018-06-20 5:55 ` Peter Xu 2018-06-20 5:55 ` [Qemu-devel] " Peter Xu 2018-06-28 14:00 ` Xiao Guangrong 2018-06-28 14:00 ` [Qemu-devel] " Xiao Guangrong 2018-06-20 12:38 ` Michael S. Tsirkin 2018-06-20 12:38 ` [Qemu-devel] " Michael S. Tsirkin 2018-06-29 7:30 ` Xiao Guangrong 2018-06-29 7:30 ` [Qemu-devel] " Xiao Guangrong 2018-06-29 13:08 ` Michael S. Tsirkin 2018-06-29 13:08 ` [Qemu-devel] " Michael S. Tsirkin 2018-07-03 7:31 ` Xiao Guangrong 2018-07-03 7:31 ` [Qemu-devel] " Xiao Guangrong 2018-06-28 13:36 ` Jason Wang 2018-06-28 13:36 ` [Qemu-devel] " Jason Wang 2018-06-29 3:59 ` Xiao Guangrong 2018-06-29 3:59 ` [Qemu-devel] " Xiao Guangrong 2018-06-29 6:15 ` Jason Wang 2018-06-29 6:15 ` [Qemu-devel] " Jason Wang 2018-06-29 7:47 ` Xiao Guangrong 2018-06-29 7:47 ` [Qemu-devel] " Xiao Guangrong 2018-06-29 4:23 ` Michael S. Tsirkin 2018-06-29 4:23 ` [Qemu-devel] " Michael S. Tsirkin 2018-06-29 7:44 ` Xiao Guangrong 2018-06-29 7:44 ` [Qemu-devel] " Xiao Guangrong 2018-06-04 9:55 ` [PATCH 10/12] migration: introduce lockless multithreads model guangrong.xiao 2018-06-04 9:55 ` [Qemu-devel] " guangrong.xiao 2018-06-20 6:52 ` Peter Xu 2018-06-20 6:52 ` [Qemu-devel] " Peter Xu 2018-06-28 14:25 ` Xiao Guangrong 2018-06-28 14:25 ` [Qemu-devel] " Xiao Guangrong 2018-07-13 16:24 ` Dr. David Alan Gilbert 2018-07-13 16:24 ` [Qemu-devel] " Dr. David Alan Gilbert 2018-07-18 7:12 ` Xiao Guangrong 2018-07-18 7:12 ` [Qemu-devel] " Xiao Guangrong 2018-06-04 9:55 ` [PATCH 11/12] migration: use lockless Multithread model for compression guangrong.xiao 2018-06-04 9:55 ` [Qemu-devel] " guangrong.xiao 2018-06-04 9:55 ` [PATCH 12/12] migration: use lockless Multithread model for decompression guangrong.xiao 2018-06-04 9:55 ` [Qemu-devel] " guangrong.xiao 2018-06-11 8:00 ` [PATCH 00/12] migration: improve multithreads for compression and decompression Peter Xu 2018-06-11 8:00 ` [Qemu-devel] " Peter Xu 2018-06-12 3:19 ` Xiao Guangrong 2018-06-12 3:19 ` [Qemu-devel] " Xiao Guangrong 2018-06-12 5:36 ` Peter Xu 2018-06-12 5:36 ` [Qemu-devel] " Peter Xu
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20180716190122.GE2664@work-vm \ --to=dgilbert@redhat.com \ --cc=guangrong.xiao@gmail.com \ --cc=jiang.biao2@zte.com.cn \ --cc=kvm@vger.kernel.org \ --cc=mst@redhat.com \ --cc=mtosatti@redhat.com \ --cc=pbonzini@redhat.com \ --cc=peterx@redhat.com \ --cc=qemu-devel@nongnu.org \ --cc=wei.w.wang@intel.com \ --cc=xiaoguangrong@tencent.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.