On Fri, Jan 20, 2023 at 16:47:41 +0800, Jiang Jiacheng wrote: > Add qemu migration parameters to support setting multifd > migration compression method and level. > > Signed-off-by: Jiang Jiacheng <jiangjiacheng@xxxxxxxxxx> > --- > src/qemu/qemu_migration.h | 2 ++ > src/qemu/qemu_migration_params.c | 24 +++++++++++++++++++++++- > src/qemu/qemu_migration_params.h | 3 +++ > 3 files changed, 28 insertions(+), 1 deletion(-) > ... > diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_params.c > index bd09dcfb23..380fc7dccd 100644 > --- a/src/qemu/qemu_migration_params.c > +++ b/src/qemu/qemu_migration_params.c ... > @@ -662,7 +682,9 @@ qemuMigrationParamsFromFlags(virTypedParameterPtr params, > return NULL; > } > > - if (migParams->params[QEMU_MIGRATION_PARAM_MULTIFD_CHANNELS].set && > + if ((migParams->params[QEMU_MIGRATION_PARAM_MULTIFD_CHANNELS].set || > + migParams->params[QEMU_MIGRATION_PARAM_MULTIFD_ZLIB_LEVEL].set || > + migParams->params[QEMU_MIGRATION_PARAM_MULTIFD_ZSTD_LEVEL].set) && > !(flags & VIR_MIGRATE_PARALLEL)) { > virReportError(VIR_ERR_INVALID_ARG, "%s", > _("Turn parallel migration on to tune it")); This check doesn't really make sense here. The new parameters tune multifd compression (if enabled) rather than multifd migration itself. > diff --git a/src/qemu/qemu_migration_params.h b/src/qemu/qemu_migration_params.h > index e7c65f6a21..5857673227 100644 > --- a/src/qemu/qemu_migration_params.h > +++ b/src/qemu/qemu_migration_params.h > @@ -59,6 +59,9 @@ typedef enum { > QEMU_MIGRATION_PARAM_XBZRLE_CACHE_SIZE, > QEMU_MIGRATION_PARAM_MAX_POSTCOPY_BANDWIDTH, > QEMU_MIGRATION_PARAM_MULTIFD_CHANNELS, > + QEMU_MIGRATION_PARAM_MULTIFD_COMPRESSION, > + QEMU_MIGRATION_PARAM_MULTIFD_ZLIB_LEVEL, > + QEMU_MIGRATION_PARAM_MULTIFD_ZSTD_LEVEL, > > QEMU_MIGRATION_PARAM_LAST > } qemuMigrationParam; And this patch should actually be squashed into the next one. Jirka