Message ID | 20180425200326.72337-2-dgilbert@redhat.com |
---|---|
State | New |
Headers | show |
Series | [PULL,01/16] migration: introduce postcopy-blocktime capability | expand |
On 04/25/2018 03:03 PM, Dr. David Alan Gilbert (git) wrote: > From: Alexey Perevalov <a.perevalov@samsung.com> > > Right now it could be used on destination side to > enable vCPU blocktime calculation for postcopy live migration. > vCPU blocktime - it's time since vCPU thread was put into > interruptible sleep, till memory page was copied and thread awake. > > Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> > Signed-off-by: Alexey Perevalov <a.perevalov@samsung.com> > Reviewed-by: Juan Quintela <quintela@redhat.com> > Signed-off-by: Juan Quintela <quintela@redhat.com> > Message-Id: <1521742647-25550-2-git-send-email-a.perevalov@samsung.com> > Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> > --- > +++ b/qapi/migration.json > @@ -354,16 +354,20 @@ > # > # @x-multifd: Use more than one fd for migration (since 2.11) > # > +# > # @dirty-bitmaps: If enabled, QEMU will migrate named dirty bitmaps. Why is the extra blank line added here? Doesn't hold up the pull request, but might be worth a trivial followup patch. > # (since 2.12) > # > +# @postcopy-blocktime: Calculate downtime for postcopy live migration > +# (since 2.13) > +# > # Since: 1.2 > ## > { 'enum': 'MigrationCapability', > 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks', > 'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram', > 'block', 'return-path', 'pause-before-switchover', 'x-multifd', > - 'dirty-bitmaps' ] } > + 'dirty-bitmaps', 'postcopy-blocktime' ] } > > ## > # @MigrationCapabilityStatus: >
* Eric Blake (eblake@redhat.com) wrote: > On 04/25/2018 03:03 PM, Dr. David Alan Gilbert (git) wrote: > > From: Alexey Perevalov <a.perevalov@samsung.com> > > > > Right now it could be used on destination side to > > enable vCPU blocktime calculation for postcopy live migration. > > vCPU blocktime - it's time since vCPU thread was put into > > interruptible sleep, till memory page was copied and thread awake. > > > > Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> > > Signed-off-by: Alexey Perevalov <a.perevalov@samsung.com> > > Reviewed-by: Juan Quintela <quintela@redhat.com> > > Signed-off-by: Juan Quintela <quintela@redhat.com> > > Message-Id: <1521742647-25550-2-git-send-email-a.perevalov@samsung.com> > > Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> > > --- > > > +++ b/qapi/migration.json > > @@ -354,16 +354,20 @@ > > # > > # @x-multifd: Use more than one fd for migration (since 2.11) > > # > > +# > > # @dirty-bitmaps: If enabled, QEMU will migrate named dirty bitmaps. > > Why is the extra blank line added here? Doesn't hold up the pull > request, but might be worth a trivial followup patch. I think it's just a merge artifact; this patch has been around for a few versions so has been bumped down that list a few times. OK, I'll do that. Dave > > # (since 2.12) > > # > > +# @postcopy-blocktime: Calculate downtime for postcopy live migration > > +# (since 2.13) > > +# > > # Since: 1.2 > > ## > > { 'enum': 'MigrationCapability', > > 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks', > > 'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram', > > 'block', 'return-path', 'pause-before-switchover', 'x-multifd', > > - 'dirty-bitmaps' ] } > > + 'dirty-bitmaps', 'postcopy-blocktime' ] } > > > > ## > > # @MigrationCapabilityStatus: > > > > -- > Eric Blake, Principal Software Engineer > Red Hat, Inc. +1-919-301-3266 > Virtualization: qemu.org | libvirt.org > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
diff --git a/migration/migration.c b/migration/migration.c index 52a5092add..bf2e8db9c7 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -1541,6 +1541,15 @@ bool migrate_zero_blocks(void) return s->enabled_capabilities[MIGRATION_CAPABILITY_ZERO_BLOCKS]; } +bool migrate_postcopy_blocktime(void) +{ + MigrationState *s; + + s = migrate_get_current(); + + return s->enabled_capabilities[MIGRATION_CAPABILITY_POSTCOPY_BLOCKTIME]; +} + bool migrate_use_compression(void) { MigrationState *s; diff --git a/migration/migration.h b/migration/migration.h index 8d2f320c48..46a50bc789 100644 --- a/migration/migration.h +++ b/migration/migration.h @@ -230,6 +230,7 @@ int migrate_compress_level(void); int migrate_compress_threads(void); int migrate_decompress_threads(void); bool migrate_use_events(void); +bool migrate_postcopy_blocktime(void); /* Sending on the return path - generic and then for each message type */ void migrate_send_rp_shut(MigrationIncomingState *mis, diff --git a/qapi/migration.json b/qapi/migration.json index 9d0bf82cf4..24bfc190ba 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -354,16 +354,20 @@ # # @x-multifd: Use more than one fd for migration (since 2.11) # +# # @dirty-bitmaps: If enabled, QEMU will migrate named dirty bitmaps. # (since 2.12) # +# @postcopy-blocktime: Calculate downtime for postcopy live migration +# (since 2.13) +# # Since: 1.2 ## { 'enum': 'MigrationCapability', 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks', 'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram', 'block', 'return-path', 'pause-before-switchover', 'x-multifd', - 'dirty-bitmaps' ] } + 'dirty-bitmaps', 'postcopy-blocktime' ] } ## # @MigrationCapabilityStatus: