From ca99993adc9205c905dba5dc1bb819959ada7200 Mon Sep 17 00:00:00 2001 From: "Dr. David Alan Gilbert" Date: Mon, 14 Apr 2014 17:03:59 +0100 Subject: Disallow outward migration while awaiting incoming migration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QEMU will assert if you attempt to start an outgoing migration on a QEMU that's sitting waiting for an incoming migration (started with -incoming), so disallow it with a proper error. (This is a fix for https://bugzilla.redhat.com/show_bug.cgi?id=1086987 ) Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Andreas Färber Reviewed-by: Eric Blake Signed-off-by: Juan Quintela --- migration.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'migration.c') diff --git a/migration.c b/migration.c index bd1fb91..ac23275 100644 --- a/migration.c +++ b/migration.c @@ -419,6 +419,11 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk, return; } + if (runstate_check(RUN_STATE_INMIGRATE)) { + error_setg(errp, "Guest is waiting for an incoming migration"); + return; + } + if (qemu_savevm_state_blocked(errp)) { return; } -- cgit v1.1 From 58570ed894631904bcdbcd1e8b34479cebe2aae9 Mon Sep 17 00:00:00 2001 From: ChenLiang Date: Fri, 4 Apr 2014 17:57:55 +0800 Subject: migration: expose the bitmap_sync_count to the end expose the count that logs the times of updating the dirty bitmap to end user. Signed-off-by: ChenLiang Signed-off-by: Gonglei Reviewed-by: Eric Blake Signed-off-by: Juan Quintela --- migration.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'migration.c') diff --git a/migration.c b/migration.c index ac23275..2cb768d 100644 --- a/migration.c +++ b/migration.c @@ -215,6 +215,7 @@ MigrationInfo *qmp_query_migrate(Error **errp) info->ram->normal_bytes = norm_mig_bytes_transferred(); info->ram->dirty_pages_rate = s->dirty_pages_rate; info->ram->mbps = s->mbps; + info->ram->dirty_sync_count = s->dirty_sync_count; if (blk_mig_active()) { info->has_disk = true; @@ -248,6 +249,7 @@ MigrationInfo *qmp_query_migrate(Error **errp) info->ram->normal = norm_mig_pages_transferred(); info->ram->normal_bytes = norm_mig_bytes_transferred(); info->ram->mbps = s->mbps; + info->ram->dirty_sync_count = s->dirty_sync_count; break; case MIG_STATE_ERROR: info->has_status = true; -- cgit v1.1 From 8bc3923343e91902ca541112b3bdb5448f8d288e Mon Sep 17 00:00:00 2001 From: ChenLiang Date: Fri, 4 Apr 2014 17:57:56 +0800 Subject: migration: expose xbzrle cache miss rate expose xbzrle cache miss rate Signed-off-by: ChenLiang Signed-off-by: Gonglei Reviewed-by: Eric Blake Signed-off-by: Juan Quintela --- migration.c | 1 + 1 file changed, 1 insertion(+) (limited to 'migration.c') diff --git a/migration.c b/migration.c index 2cb768d..52cda27 100644 --- a/migration.c +++ b/migration.c @@ -174,6 +174,7 @@ static void get_xbzrle_cache_stats(MigrationInfo *info) info->xbzrle_cache->bytes = xbzrle_mig_bytes_transferred(); info->xbzrle_cache->pages = xbzrle_mig_pages_transferred(); info->xbzrle_cache->cache_miss = xbzrle_mig_pages_cache_miss(); + info->xbzrle_cache->cache_miss_rate = xbzrle_mig_cache_miss_rate(); info->xbzrle_cache->overflow = xbzrle_mig_pages_overflow(); } } -- cgit v1.1