qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 15/18] migration: save_compress_page() can take block through pss


From: Juan Quintela
Subject: [PATCH 15/18] migration: save_compress_page() can take block through pss
Date: Tue, 13 Jun 2023 16:57:54 +0200

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 migration/ram.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/migration/ram.c b/migration/ram.c
index 1bd586c23a..e3ff98a6ce 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -1986,7 +1986,7 @@ int ram_save_queue_pages(const char *rbname, ram_addr_t 
start, ram_addr_t len)
  * paths to handle it
  */
 static bool save_compress_page(RAMState *rs, PageSearchStatus *pss,
-                               RAMBlock *block, ram_addr_t offset)
+                               ram_addr_t offset)
 {
     if (!migrate_compress()) {
         return false;
@@ -2002,12 +2002,13 @@ static bool save_compress_page(RAMState *rs, 
PageSearchStatus *pss,
      * We post the fist page as normal page as compression will take
      * much CPU resource.
      */
-    if (block != pss->last_sent_block) {
+    if (pss->block != pss->last_sent_block) {
         ram_flush_compressed_data();
         return false;
     }
 
-    return compress_page_with_multi_thread(block, offset, send_queued_data);
+    return compress_page_with_multi_thread(pss->block, offset,
+                                           send_queued_data);
 }
 
 /**
@@ -2028,7 +2029,7 @@ static int ram_save_target_page_legacy(RAMState *rs, 
PageSearchStatus *pss)
         return res;
     }
 
-    if (save_compress_page(rs, pss, block, offset)) {
+    if (save_compress_page(rs, pss, offset)) {
         return 1;
     }
 
-- 
2.40.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]