]> git.proxmox.com Git - mirror_qemu.git/commitdiff
migration: Move busy++ to migrate_with_multithread
authorJuan Quintela <quintela@redhat.com>
Thu, 19 Oct 2023 11:07:19 +0000 (13:07 +0200)
committerJuan Quintela <quintela@redhat.com>
Mon, 30 Oct 2023 16:41:55 +0000 (17:41 +0100)
And now we can simplify save_compress_page().

Reviewed-by: Lukas Straub <lukasstraub2@web.de>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231019110724.15324-7-quintela@redhat.com>

migration/ram-compress.c
migration/ram.c

index a991b15b7a6bd53bdb7fba11d8e1c5e57416e516..f56e1f8e693e6d34694f658cf094f6963dd61b6e 100644 (file)
@@ -291,6 +291,7 @@ bool compress_page_with_multi_thread(RAMBlock *block, ram_addr_t offset,
         }
         if (!wait) {
             qemu_mutex_unlock(&comp_done_lock);
+            compression_counters.busy++;
             return false;
         }
         /*
index 63a575ae90498eae46c8f795b4438d6eb203395a..46209388ec9ab6f09ba0d73936cd62bd36674024 100644 (file)
@@ -2067,12 +2067,8 @@ static bool save_compress_page(RAMState *rs, PageSearchStatus *pss,
         return false;
     }
 
-    if (compress_page_with_multi_thread(pss->block, offset, send_queued_data)) {
-        return true;
-    }
-
-    compression_counters.busy++;
-    return false;
+    return compress_page_with_multi_thread(pss->block, offset,
+                                           send_queued_data);
 }
 
 /**