diff options
author | Xiao Guangrong | 2018-09-06 09:01:01 +0200 |
---|---|---|
committer | Dr. David Alan Gilbert | 2018-09-26 13:27:43 +0200 |
commit | 32b054954fb4a14b201f88d0b7fc94c60b8a740e (patch) | |
tree | b8f06d2a2b4606be1ccba233bd6565e4693427e5 /migration | |
parent | migration: show the statistics of compression (diff) | |
download | qemu-32b054954fb4a14b201f88d0b7fc94c60b8a740e.tar.gz qemu-32b054954fb4a14b201f88d0b7fc94c60b8a740e.tar.xz qemu-32b054954fb4a14b201f88d0b7fc94c60b8a740e.zip |
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 7c12f2792c..0fdaa8efa3 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(); |