summary refs log tree commit diff stats
path: root/migration/migration.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2017-05-03 13:16:38 +0200
committerJuan Quintela <quintela@redhat.com>2017-06-07 10:20:52 +0200
commit338182c83c38f6c13731a98e487e7ba3cda6a615 (patch)
treed7b5a1fb7db41d1b9d6dc18bf9b1d43ee7b2b6e4 /migration/migration.c
parent114f5aee02e7d815c2241c46d9f9d1c939b1f7d3 (diff)
downloadfocaccia-qemu-338182c83c38f6c13731a98e487e7ba3cda6a615.tar.gz
focaccia-qemu-338182c83c38f6c13731a98e487e7ba3cda6a615.zip
ram: We only print throttling information sometimes
Change it to be consistent with everything else.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'migration/migration.c')
-rw-r--r--migration/migration.c10
1 files 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 */