Message ID | 2ef63cf661750cd848492c4f917e46e3700c1409.1652762652.git.huangy81@chinatelecom.cn (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | migration: introduce dirtylimit capability | expand |
On Tue, May 17, 2022 at 02:35:04PM +0800, huangy81@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) <huangy81@chinatelecom.cn> > > Introduce migration dirtylimit capability, which can > be turned on before live migration and limit dirty > page rate durty live migration. s/durty/during/ ? > > Dirtylimit dirtylimit capability is kind of like Doubled word > auto-converge but using dirtylimit instead of traditional > cpu-throttle to throttle guest down. > > To enable this feature, turn on the dirtylimit capability > before live migration using migratioin-set-capabilities, > and set dirtylimit-related parameters "vcpu-dirtylimit", > "vcpu-dirtylimit-period" suitably to speed up convergence. > > Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn> > --- > +++ b/qapi/migration.json > @@ -463,6 +463,9 @@ > # procedure starts. The VM RAM is saved with running VM. > # (since 6.0) > # > +# @dirtylimit: Use dirtylimit to throttle down guest if enabled. > +# (since 7.0) 7.1 same question about naming it 'dirty-limit'
diff --git a/migration/migration.c b/migration/migration.c index 9e4ce01..4a659b6 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -2427,7 +2427,11 @@ bool migrate_auto_converge(void) bool migrate_dirtylimit(void) { - return false; + MigrationState *s; + + s = migrate_get_current(); + + return s->enabled_capabilities[MIGRATION_CAPABILITY_DIRTYLIMIT]; } bool migrate_zero_blocks(void) @@ -4270,6 +4274,7 @@ static Property migration_properties[] = { DEFINE_PROP_MIG_CAP("x-multifd", MIGRATION_CAPABILITY_MULTIFD), DEFINE_PROP_MIG_CAP("x-background-snapshot", MIGRATION_CAPABILITY_BACKGROUND_SNAPSHOT), + DEFINE_PROP_MIG_CAP("x-dirtylimit", MIGRATION_CAPABILITY_DIRTYLIMIT), DEFINE_PROP_END_OF_LIST(), }; diff --git a/qapi/migration.json b/qapi/migration.json index 68c1fe0..30ad413 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -463,6 +463,9 @@ # procedure starts. The VM RAM is saved with running VM. # (since 6.0) # +# @dirtylimit: Use dirtylimit to throttle down guest if enabled. +# (since 7.0) +# # Features: # @unstable: Members @x-colo and @x-ignore-shared are experimental. # @@ -476,7 +479,7 @@ 'block', 'return-path', 'pause-before-switchover', 'multifd', 'dirty-bitmaps', 'postcopy-blocktime', 'late-block-activate', { 'name': 'x-ignore-shared', 'features': [ 'unstable' ] }, - 'validate-uuid', 'background-snapshot'] } + 'validate-uuid', 'background-snapshot', 'dirtylimit'] } ## # @MigrationCapabilityStatus: