[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 23/23] migration: Use multifd before we check for the zero pag
From: |
Juan Quintela |
Subject: |
[PATCH v3 23/23] migration: Use multifd before we check for the zero page |
Date: |
Wed, 24 Nov 2021 11:06:17 +0100 |
So we use multifd to transmit zero pages.
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
migration/ram.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/migration/ram.c b/migration/ram.c
index 57efa67f20..3ae094f653 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -2138,6 +2138,17 @@ static int ram_save_target_page(RAMState *rs,
PageSearchStatus *pss,
ram_addr_t offset = ((ram_addr_t)pss->page) << TARGET_PAGE_BITS;
int res;
+ /*
+ * Do not use multifd for:
+ * 1. Compression as the first page in the new block should be posted out
+ * before sending the compressed page
+ * 2. In postcopy as one whole host page should be placed
+ */
+ if (!save_page_use_compression(rs) && migrate_use_multifd()
+ && !migration_in_postcopy()) {
+ return ram_save_multifd_page(rs, block, offset);
+ }
+
if (control_save_page(rs, block, offset, &res)) {
return res;
}
@@ -2160,17 +2171,6 @@ static int ram_save_target_page(RAMState *rs,
PageSearchStatus *pss,
return res;
}
- /*
- * Do not use multifd for:
- * 1. Compression as the first page in the new block should be posted out
- * before sending the compressed page
- * 2. In postcopy as one whole host page should be placed
- */
- if (!save_page_use_compression(rs) && migrate_use_multifd()
- && !migration_in_postcopy()) {
- return ram_save_multifd_page(rs, block, offset);
- }
-
return ram_save_page(rs, pss, last_stage);
}
--
2.33.1
- [PATCH v3 13/23] multifd: Make zstd use iov's, (continued)
- [PATCH v3 13/23] multifd: Make zstd use iov's, Juan Quintela, 2021/11/24
- [PATCH v3 15/23] multifd: Use a single writev on the send side, Juan Quintela, 2021/11/24
- [PATCH v3 16/23] multifd: Unfold "used" variable by its value, Juan Quintela, 2021/11/24
- [PATCH v3 17/23] multifd: Use normal pages array on the send side, Juan Quintela, 2021/11/24
- [PATCH v3 14/23] multifd: Remove send_write() method, Juan Quintela, 2021/11/24
- [PATCH v3 18/23] multifd: Use normal pages array on the recv side, Juan Quintela, 2021/11/24
- [PATCH v3 19/23] multifd: recv side only needs the RAMBlock host address, Juan Quintela, 2021/11/24
- [PATCH v3 20/23] multifd: Rename pages_used to normal_pages, Juan Quintela, 2021/11/24
- [PATCH v3 21/23] multifd: Support for zero pages transmission, Juan Quintela, 2021/11/24
- [PATCH v3 22/23] multifd: Zero pages transmission, Juan Quintela, 2021/11/24
- [PATCH v3 23/23] migration: Use multifd before we check for the zero page,
Juan Quintela <=
- Re: [PATCH v3 00/23] Migration: Transmit and detect zero pages in the multifd threads, Peter Xu, 2021/11/24