]> git.proxmox.com Git - mirror_qemu.git/commitdiff
migration: introduce postcopy-blocktime capability
authorAlexey Perevalov <a.perevalov@samsung.com>
Mon, 30 Oct 2017 13:16:25 +0000 (16:16 +0300)
committerJuan Quintela <quintela@redhat.com>
Mon, 15 Jan 2018 11:47:59 +0000 (12:47 +0100)
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>
migration/migration.c
migration/migration.h
qapi/migration.json

index 19917a4b5b4e983bfe4542751cb28a67dc4e8145..fb876e9fcab8d656f2ecc03e502a32f2efc3a21f 100644 (file)
@@ -1499,6 +1499,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;
index 663415fe4839692c7638d73f48ffc2c3861d5ecc..9ab8d070045e2680878d2473de46eda99f538214 100644 (file)
@@ -201,6 +201,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,
index 4cd3d1315884e2de869aa863b3405d2c84fae65f..4d8ccdf7768bde893186aaf7f1bb458025811bf8 100644 (file)
 #
 # @x-multifd: Use more than one fd for migration (since 2.11)
 #
+# @postcopy-blocktime: Calculate downtime for postcopy live migration
+#                     (since 2.12)
+#
 # 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' ] }
+           'block', 'return-path', 'pause-before-switchover', 'x-multifd',
+           'postcopy-blocktime' ] }
 
 ##
 # @MigrationCapabilityStatus: