[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
- [PATCH 08/18] migration: Move update_compress_threads_counts() to ram-compress.c, (continued)
- [PATCH 08/18] migration: Move update_compress_threads_counts() to ram-compress.c, Juan Quintela, 2023/06/13
- [PATCH 09/18] migration: Make compress_data_with_multithreads return bool, Juan Quintela, 2023/06/13
- [PATCH 06/18] migration: Create populate_compress(), Juan Quintela, 2023/06/13
- [PATCH 10/18] migration: Simplify compress_page_with_multithread(), Juan Quintela, 2023/06/13
- [PATCH 13/18] migration: Simplify decompress_data_with_multi_threads(), Juan Quintela, 2023/06/13
- [PATCH 15/18] migration: save_compress_page() can take block through pss,
Juan Quintela <=
- [PATCH 18/18] migration: Remove not needed file parameter for save_zero_page*, Juan Quintela, 2023/06/13
- [PATCH 05/18] migration: Move compression_counters cleanup ram-compress.c, Juan Quintela, 2023/06/13
- [PATCH 12/18] migration: Create compression_update_rates(), Juan Quintela, 2023/06/13
- [PATCH 11/18] migration: Move busy++ to migrate_with_multithread, Juan Quintela, 2023/06/13
- [PATCH 14/18] migration: Use "i" as an for index in ram-compress.c, Juan Quintela, 2023/06/13