[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 33/34] migration/multifd: Enable multifd zero page checking by def
From: |
peterx |
Subject: |
[PULL 33/34] migration/multifd: Enable multifd zero page checking by default. |
Date: |
Mon, 11 Mar 2024 17:59:24 -0400 |
From: Hao Xiang <hao.xiang@bytedance.com>
1. Set default "zero-page-detection" option to "multifd". Now
zero page checking can be done in the multifd threads and this
becomes the default configuration.
2. Handle migration QEMU9.0 -> QEMU8.2 compatibility. We provide
backward compatibility where zero page checking is done from the
migration main thread.
Signed-off-by: Hao Xiang <hao.xiang@bytedance.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: 20240311180015.3359271-7-hao.xiang@linux.dev">https://lore.kernel.org/r/20240311180015.3359271-7-hao.xiang@linux.dev
Signed-off-by: Peter Xu <peterx@redhat.com>
---
qapi/migration.json | 6 +++---
hw/core/machine.c | 4 +++-
migration/options.c | 2 +-
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/qapi/migration.json b/qapi/migration.json
index 2684e4e9ac..aa1b39bce1 100644
--- a/qapi/migration.json
+++ b/qapi/migration.json
@@ -909,7 +909,7 @@
# (Since 8.2)
#
# @zero-page-detection: Whether and how to detect zero pages.
-# See description in @ZeroPageDetection. Default is 'legacy'.
+# See description in @ZeroPageDetection. Default is 'multifd'.
# (since 9.0)
#
# Features:
@@ -1106,7 +1106,7 @@
# (Since 8.2)
#
# @zero-page-detection: Whether and how to detect zero pages.
-# See description in @ZeroPageDetection. Default is 'legacy'.
+# See description in @ZeroPageDetection. Default is 'multifd'.
# (since 9.0)
#
# Features:
@@ -1339,7 +1339,7 @@
# (Since 8.2)
#
# @zero-page-detection: Whether and how to detect zero pages.
-# See description in @ZeroPageDetection. Default is 'legacy'.
+# See description in @ZeroPageDetection. Default is 'multifd'.
# (since 9.0)
#
# Features:
diff --git a/hw/core/machine.c b/hw/core/machine.c
index 9ac5d5389a..0e9d646b61 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -32,7 +32,9 @@
#include "hw/virtio/virtio-net.h"
#include "audio/audio.h"
-GlobalProperty hw_compat_8_2[] = {};
+GlobalProperty hw_compat_8_2[] = {
+ { "migration", "zero-page-detection", "legacy"},
+};
const size_t hw_compat_8_2_len = G_N_ELEMENTS(hw_compat_8_2);
GlobalProperty hw_compat_8_1[] = {
diff --git a/migration/options.c b/migration/options.c
index 8f2a3a2fa5..9ed2fe4bee 100644
--- a/migration/options.c
+++ b/migration/options.c
@@ -181,7 +181,7 @@ Property migration_properties[] = {
MIG_MODE_NORMAL),
DEFINE_PROP_ZERO_PAGE_DETECTION("zero-page-detection", MigrationState,
parameters.zero_page_detection,
- ZERO_PAGE_DETECTION_LEGACY),
+ ZERO_PAGE_DETECTION_MULTIFD),
/* Migration capabilities */
DEFINE_PROP_MIG_CAP("x-xbzrle", MIGRATION_CAPABILITY_XBZRLE),
--
2.44.0
- [PULL 19/34] migration: export migration_is_active, (continued)
- [PULL 19/34] migration: export migration_is_active, peterx, 2024/03/11
- [PULL 20/34] migration: export migration_is_running, peterx, 2024/03/11
- [PULL 23/34] migration: migration_is_device, peterx, 2024/03/11
- [PULL 22/34] migration: migration_thread_is_self, peterx, 2024/03/11
- [PULL 25/34] migration: privatize colo interfaces, peterx, 2024/03/11
- [PULL 26/34] migration: delete unused accessors, peterx, 2024/03/11
- [PULL 28/34] migration/multifd: Allow zero pages in file migration, peterx, 2024/03/11
- [PULL 24/34] migration: migration_file_set_error, peterx, 2024/03/11
- [PULL 30/34] migration/multifd: Add new migration option zero-page-detection., peterx, 2024/03/11
- [PULL 32/34] migration/multifd: Implement ram_save_target_page_multifd to handle multifd version of MigrationOps::ram_save_target_page., peterx, 2024/03/11
- [PULL 33/34] migration/multifd: Enable multifd zero page checking by default.,
peterx <=
- [PULL 31/34] migration/multifd: Implement zero page transmission on the multifd thread., peterx, 2024/03/11
- Re: [PULL 00/34] Migration 20240311 patches, Peter Maydell, 2024/03/12