From: guangrong.xiao@gmail.com
To: pbonzini@redhat.com, mst@redhat.com, mtosatti@redhat.com
Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, dgilbert@redhat.com,
peterx@redhat.com, wei.w.wang@intel.com, jiang.biao2@zte.com.cn,
eblake@redhat.com, quintela@redhat.com,
Xiao Guangrong <xiaoguangrong@tencent.com>
Subject: [Qemu-devel] [PATCH v6 3/3] migration: use save_page_use_compression in flush_compressed_data
Date: Thu, 6 Sep 2018 15:01:01 +0800 [thread overview]
Message-ID: <20180906070101.27280-4-xiaoguangrong@tencent.com> (raw)
In-Reply-To: <20180906070101.27280-1-xiaoguangrong@tencent.com>
From: Xiao Guangrong <xiaoguangrong@tencent.com>
It avoids to touch compression locks if xbzrle and compression
are both enabled
Signed-off-by: Xiao Guangrong <xiaoguangrong@tencent.com>
---
migration/ram.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/migration/ram.c b/migration/ram.c
index 65a563993d..747dd9208b 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -1932,11 +1932,13 @@ update_compress_thread_counts(const CompressParam *param, int bytes_xmit)
compression_counters.pages++;
}
+static bool save_page_use_compression(RAMState *rs);
+
static void flush_compressed_data(RAMState *rs)
{
int idx, len, thread_count;
- if (!migrate_use_compression()) {
+ if (!save_page_use_compression(rs)) {
return;
}
thread_count = migrate_compress_threads();
--
2.14.4
next prev parent reply other threads:[~2018-09-06 7:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-06 7:00 [Qemu-devel] [PATCH v6 0/3] migration: compression optimization guangrong.xiao
2018-09-06 7:00 ` [Qemu-devel] [PATCH v6 1/3] migration: do not flush_compressed_data at the end of iteration guangrong.xiao
2018-09-06 9:38 ` Juan Quintela
2018-09-06 7:01 ` [Qemu-devel] [PATCH v6 2/3] migration: show the statistics of compression guangrong.xiao
2018-09-06 7:01 ` guangrong.xiao [this message]
2018-09-06 9:49 ` [Qemu-devel] [PATCH v6 3/3] migration: use save_page_use_compression in flush_compressed_data Juan Quintela
2018-09-06 11:03 ` [Qemu-devel] [PATCH v6 0/3] migration: compression optimization Juan Quintela
2018-09-13 7:45 ` Xiao Guangrong
2018-09-13 13:26 ` Juan Quintela
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=20180906070101.27280-4-xiaoguangrong@tencent.com \
--to=guangrong.xiao@gmail.com \
--cc=dgilbert@redhat.com \
--cc=eblake@redhat.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=quintela@redhat.com \
--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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).