diff options
author | Xiao Guangrong <xiaoguangrong@tencent.com> | 2018-09-06 15:01:01 +0800 |
---|---|---|
committer | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2018-09-26 12:27:43 +0100 |
commit | 32b054954fb4a14b201f88d0b7fc94c60b8a740e (patch) | |
tree | b8f06d2a2b4606be1ccba233bd6565e4693427e5 /migration | |
parent | 76e030004f7fbabc2f978e8cd44052e17abd55b2 (diff) | |
download | qemu-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')
-rw-r--r-- | migration/ram.c | 4 |
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(); |