aboutsummaryrefslogtreecommitdiff
path: root/migration
diff options
context:
space:
mode:
authorAlexey Perevalov <a.perevalov@samsung.com>2017-10-30 16:16:25 +0300
committerJuan Quintela <quintela@redhat.com>2018-01-15 12:47:59 +0100
commit31bf06a9d6844d9977b028bd9b855d53288f979c (patch)
tree66fbffbbb9eb0c9f766fd2219f0a98a9542c8fb7 /migration
parent029ff892e1049ca4f93f9d8f0059bc02fffd6e32 (diff)
downloadqemu-31bf06a9d6844d9977b028bd9b855d53288f979c.zip
qemu-31bf06a9d6844d9977b028bd9b855d53288f979c.tar.gz
qemu-31bf06a9d6844d9977b028bd9b855d53288f979c.tar.bz2
migration: introduce postcopy-blocktime capability
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>
Diffstat (limited to 'migration')
-rw-r--r--migration/migration.c9
-rw-r--r--migration/migration.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/migration/migration.c b/migration/migration.c
index 19917a4..fb876e9 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -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;
diff --git a/migration/migration.h b/migration/migration.h
index 663415f..9ab8d070 100644
--- a/migration/migration.h
+++ b/migration/migration.h
@@ -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,