@@ -373,6 +373,11 @@ struct MigrationState {
* This save hostname when out-going migration starts
*/
char *hostname;
+ /*
+ * Synchronize channels after each section is sent.
+ * We used to do that on the past, but it is suboptimal.
+ */
+ bool multifd_sync_after_each_section;
};
void migrate_set_state(int *state, int old_state, int new_state);
@@ -415,6 +420,7 @@ int migrate_multifd_channels(void);
MultiFDCompression migrate_multifd_compression(void);
int migrate_multifd_zlib_level(void);
int migrate_multifd_zstd_level(void);
+bool migrate_multifd_sync_after_each_section(void);
#ifdef CONFIG_LINUX
bool migrate_use_zero_copy_send(void);
@@ -43,6 +43,7 @@
GlobalProperty hw_compat_7_0[] = {
{ "arm-gicv3-common", "force-8-bit-prio", "on" },
{ "nvme-ns", "eui64-default", "on"},
+ { "migration", "multifd-sync-after-each-section", "on"},
};
const size_t hw_compat_7_0_len = G_N_ELEMENTS(hw_compat_7_0);
@@ -2592,6 +2592,13 @@ bool migrate_use_multifd(void)
return s->enabled_capabilities[MIGRATION_CAPABILITY_MULTIFD];
}
+bool migrate_multifd_sync_after_each_section(void)
+{
+ MigrationState *s = migrate_get_current();
+
+ return s->multifd_sync_after_each_section;
+}
+
bool migrate_pause_before_switchover(void)
{
MigrationState *s;
@@ -4384,7 +4391,9 @@ static Property migration_properties[] = {
DEFINE_PROP_STRING("tls-creds", MigrationState, parameters.tls_creds),
DEFINE_PROP_STRING("tls-hostname", MigrationState, parameters.tls_hostname),
DEFINE_PROP_STRING("tls-authz", MigrationState, parameters.tls_authz),
-
+ /* We will change to false when we introduce the new mechanism */
+ DEFINE_PROP_BOOL("multifd-sync-after-each-section", MigrationState,
+ multifd_sync_after_each_section, true),
/* Migration capabilities */
DEFINE_PROP_MIG_CAP("x-xbzrle", MIGRATION_CAPABILITY_XBZRLE),
DEFINE_PROP_MIG_CAP("x-rdma-pin-all", MIGRATION_CAPABILITY_RDMA_PIN_ALL),