]> Git Repo - qemu.git/commitdiff
migration: Don't create decompression threads if not enabled
authorJuan Quintela <[email protected]>
Wed, 20 Apr 2016 09:56:01 +0000 (11:56 +0200)
committerJuan Quintela <[email protected]>
Wed, 14 Jun 2017 09:11:06 +0000 (11:11 +0200)
Signed-off-by: Juan Quintela <[email protected]>
Reviewed-by: Dr. David Alan Gilbert <[email protected]>
Reviewed-by: Peter Xu <[email protected]>
--

I removed the [HACK] part because previous patch just check that
compression pages are not received.

migration/ram.c

index 09b483c83d3a93418cdd25b0795ced587ac1db2a..0baa1e0d56052055ada6d20cc84c5434c1ac955c 100644 (file)
@@ -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);
This page took 0.028427 seconds and 4 git commands to generate.