aboutsummaryrefslogtreecommitdiff
path: root/migration/ram.c
diff options
context:
space:
mode:
authorXiao Guangrong <xiaoguangrong@tencent.com>2018-09-06 15:01:01 +0800
committerDr. David Alan Gilbert <dgilbert@redhat.com>2018-09-26 12:27:43 +0100
commit32b054954fb4a14b201f88d0b7fc94c60b8a740e (patch)
treeb8f06d2a2b4606be1ccba233bd6565e4693427e5 /migration/ram.c
parent76e030004f7fbabc2f978e8cd44052e17abd55b2 (diff)
downloadqemu-32b054954fb4a14b201f88d0b7fc94c60b8a740e.zip
qemu-32b054954fb4a14b201f88d0b7fc94c60b8a740e.tar.gz
qemu-32b054954fb4a14b201f88d0b7fc94c60b8a740e.tar.bz2
migration: use save_page_use_compression in flush_compressed_data
It avoids to touch compression locks if xbzrle and compression are both enabled Signed-off-by: Xiao Guangrong <xiaoguangrong@tencent.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Message-Id: <20180906070101.27280-4-xiaoguangrong@tencent.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'migration/ram.c')
-rw-r--r--migration/ram.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/migration/ram.c b/migration/ram.c
index 7c12f27..0fdaa8e 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();