diff options
author | Jason J. Herne <jjherne@linux.vnet.ibm.com> | 2015-09-08 13:12:36 -0400 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2015-09-30 09:42:04 +0200 |
commit | 4782893e099cde24c0b10a48d0412eea575ddcb3 (patch) | |
tree | 09acbe33586f9d6198169c5ecb75425188394cea /migration/migration.c | |
parent | 070afca258f973c704dcadf2769aa1ca921209a1 (diff) | |
download | hqemu-4782893e099cde24c0b10a48d0412eea575ddcb3.zip hqemu-4782893e099cde24c0b10a48d0412eea575ddcb3.tar.gz |
qmp/hmp: Add throttle ratio to query-migrate and info migrate
Report throttle percentage in info migrate and query-migrate responses when
cpu throttling is active.
Signed-off-by: Jason J. Herne <jjherne@linux.vnet.ibm.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'migration/migration.c')
-rw-r--r-- | migration/migration.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/migration/migration.c b/migration/migration.c index e829231..c7472ed 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -447,6 +447,11 @@ MigrationInfo *qmp_query_migrate(Error **errp) info->disk->total = blk_mig_bytes_total(); } + if (cpu_throttle_active()) { + info->has_x_cpu_throttle_percentage = true; + info->x_cpu_throttle_percentage = cpu_throttle_get_percentage(); + } + get_xbzrle_cache_stats(info); break; case MIGRATION_STATUS_COMPLETED: |