diff options
author | Juan Quintela <quintela@redhat.com> | 2016-04-20 11:56:01 +0200 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2017-06-14 11:11:06 +0200 |
commit | 3416ab5bb452f1b6cea58aed8983ffb9a455b7c4 (patch) | |
tree | 9ea2eba4884ffed2d138812221bbf35d5badd58e /migration | |
parent | edc60127e4acbcf1a028d16c2ed1b3fd3e6433e4 (diff) | |
download | qemu-3416ab5bb452f1b6cea58aed8983ffb9a455b7c4.zip qemu-3416ab5bb452f1b6cea58aed8983ffb9a455b7c4.tar.gz qemu-3416ab5bb452f1b6cea58aed8983ffb9a455b7c4.tar.bz2 |
migration: Don't create decompression threads if not enabled
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
--
I removed the [HACK] part because previous patch just check that
compression pages are not received.
Diffstat (limited to 'migration')
-rw-r--r-- | migration/ram.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/migration/ram.c b/migration/ram.c index 09b483c..0baa1e0 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -2234,6 +2234,9 @@ void migrate_decompress_threads_create(void) { int i, thread_count; + if (!migrate_use_compression()) { + return; + } thread_count = migrate_decompress_threads(); decompress_threads = g_new0(QemuThread, thread_count); decomp_param = g_new0(DecompressParam, thread_count); @@ -2255,6 +2258,9 @@ void migrate_decompress_threads_join(void) { int i, thread_count; + if (!migrate_use_compression()) { + return; + } thread_count = migrate_decompress_threads(); for (i = 0; i < thread_count; i++) { qemu_mutex_lock(&decomp_param[i].mutex); |