[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH RFC 03/11] migration/block: Apply late-block-active behavior to p
From: |
Peter Xu |
Subject: |
[PATCH RFC 03/11] migration/block: Apply late-block-active behavior to postcopy |
Date: |
Tue, 3 Dec 2024 19:51:30 -0500 |
Postcopy never cared about late-block-active. However there's no mention
in the capability that it doesn't apply to postcopy.
Considering that we _assumed_ late activation is always good, do that too
for postcopy unconditionally, just like precopy. After this patch, we
should have unified the behavior across all.
Signed-off-by: Peter Xu <peterx@redhat.com>
---
migration/savevm.c | 23 ++++++++++-------------
1 file changed, 10 insertions(+), 13 deletions(-)
diff --git a/migration/savevm.c b/migration/savevm.c
index 98821c8120..0d52fe522c 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -2137,22 +2137,19 @@ static void loadvm_postcopy_handle_run_bh(void *opaque)
trace_vmstate_downtime_checkpoint("dst-postcopy-bh-announced");
- /* Make sure all file formats throw away their mutable metadata.
- * If we get an error here, just don't restart the VM yet. */
- bdrv_activate_all(&local_err);
- if (local_err) {
- error_report_err(local_err);
- local_err = NULL;
- autostart = false;
- }
-
- trace_vmstate_downtime_checkpoint("dst-postcopy-bh-cache-invalidated");
-
dirty_bitmap_mig_before_vm_start();
if (autostart) {
- /* Hold onto your hats, starting the CPU */
- vm_start();
+ /* Make sure all file formats throw away their mutable metadata.
+ * If we get an error here, just don't restart the VM yet. */
+ bdrv_activate_all(&local_err);
+ trace_vmstate_downtime_checkpoint("dst-postcopy-bh-cache-invalidated");
+ if (local_err) {
+ error_report_err(local_err);
+ local_err = NULL;
+ } else {
+ vm_start();
+ }
} else {
/* leave it paused and let management decide when to start the CPU */
runstate_set(RUN_STATE_PAUSED);
--
2.47.0
- [PATCH RFC 00/11] migration/block: disk activation rewrite, Peter Xu, 2024/12/03
- [PATCH RFC 01/11] migration: Add helper to get target runstate, Peter Xu, 2024/12/03
- [PATCH RFC 03/11] migration/block: Apply late-block-active behavior to postcopy,
Peter Xu <=
- [PATCH RFC 02/11] migration/block: Make late-block-active the default, Peter Xu, 2024/12/03
- [PATCH RFC 06/11] migration/block: Extend the migration_block_* API to dest side, Peter Xu, 2024/12/03
- [PATCH RFC 05/11] migration/block: Merge block reactivations for fail/cancel, Peter Xu, 2024/12/03
- [PATCH RFC 04/11] migration/block: Fix possible race with block_inactive, Peter Xu, 2024/12/03
- [PATCH RFC 08/11] tests/qtest/migration: Move more code under only_target, Peter Xu, 2024/12/03
- [PATCH RFC 10/11] tests/qtest/migration: Support cleaning up only one side of migration, Peter Xu, 2024/12/03
- [PATCH RFC 09/11] tests/qtest/migration: Don't use hardcoded strings for -serial, Peter Xu, 2024/12/03
- [PATCH RFC 07/11] migration/block: Apply the migration_block_* API to postcopy, Peter Xu, 2024/12/03