From 338182c83c38f6c13731a98e487e7ba3cda6a615 Mon Sep 17 00:00:00 2001 From: Juan Quintela Date: Wed, 3 May 2017 13:16:38 +0200 Subject: [PATCH] ram: We only print throttling information sometimes Change it to be consistent with everything else. Signed-off-by: Juan Quintela Reviewed-by: Eric Blake --- migration/migration.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index b1e68c09d9..9c5ff577b7 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -616,6 +616,11 @@ static void populate_ram_info(MigrationInfo *info, MigrationState *s) info->xbzrle_cache->overflow = xbzrle_mig_pages_overflow(); } + if (cpu_throttle_active()) { + info->has_cpu_throttle_percentage = true; + info->cpu_throttle_percentage = cpu_throttle_get_percentage(); + } + if (s->state != MIGRATION_STATUS_COMPLETED) { info->ram->remaining = ram_bytes_remaining(); info->ram->dirty_pages_rate = ram_dirty_pages_rate(); @@ -656,11 +661,6 @@ MigrationInfo *qmp_query_migrate(Error **errp) info->disk->total = blk_mig_bytes_total(); } - if (cpu_throttle_active()) { - info->has_cpu_throttle_percentage = true; - info->cpu_throttle_percentage = cpu_throttle_get_percentage(); - } - break; case MIGRATION_STATUS_POSTCOPY_ACTIVE: /* Mostly the same as active; TODO add some postcopy stats */