From: Juan Quintela <quintela@redhat.com>
To: qemu-devel@nongnu.org
Cc: amit.shah@redhat.com, dgilbert@redhat.com,
"Jason J. Herne" <jjherne@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PULL 5/6] qmp/hmp: Add throttle ratio to query-migrate and info migrate
Date: Wed, 30 Sep 2015 10:56:05 +0200 [thread overview]
Message-ID: <1443603366-4686-6-git-send-email-quintela@redhat.com> (raw)
In-Reply-To: <1443603366-4686-1-git-send-email-quintela@redhat.com>
From: "Jason J. Herne" <jjherne@linux.vnet.ibm.com>
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>
---
hmp.c | 5 +++++
migration/migration.c | 5 +++++
qapi-schema.json | 7 ++++++-
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/hmp.c b/hmp.c
index 48ce372..5048eee 100644
--- a/hmp.c
+++ b/hmp.c
@@ -232,6 +232,11 @@ void hmp_info_migrate(Monitor *mon, const QDict *qdict)
info->xbzrle_cache->overflow);
}
+ if (info->has_x_cpu_throttle_percentage) {
+ monitor_printf(mon, "cpu throttle percentage: %" PRIu64 "\n",
+ info->x_cpu_throttle_percentage);
+ }
+
qapi_free_MigrationInfo(info);
qapi_free_MigrationCapabilityStatusList(caps);
}
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:
diff --git a/qapi-schema.json b/qapi-schema.json
index 646c0fa..8b0520c 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -480,6 +480,10 @@
# may be expensive, but do not actually occur during the iterative
# migration rounds themselves. (since 1.6)
#
+# @x-cpu-throttle-percentage: #optional percentage of time guest cpus are being
+# throttled during auto-converge. This is only present when auto-converge
+# has started throttling guest cpus. (Since 2.5)
+#
# Since: 0.14.0
##
{ 'struct': 'MigrationInfo',
@@ -489,7 +493,8 @@
'*total-time': 'int',
'*expected-downtime': 'int',
'*downtime': 'int',
- '*setup-time': 'int'} }
+ '*setup-time': 'int',
+ '*x-cpu-throttle-percentage': 'int'} }
##
# @query-migrate
--
2.4.3
next prev parent reply other threads:[~2015-09-30 8:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-30 8:56 [Qemu-devel] [PULL 0/6] Migration pull request Juan Quintela
2015-09-30 8:56 ` [Qemu-devel] [PULL 1/6] migration: yet more possible state transitions Juan Quintela
2015-09-30 8:56 ` [Qemu-devel] [PULL 2/6] cpu: Provide vcpu throttling interface Juan Quintela
2015-09-30 8:56 ` [Qemu-devel] [PULL 3/6] migration: Parameters for auto-converge cpu throttling Juan Quintela
2015-09-30 8:56 ` [Qemu-devel] [PULL 4/6] migration: Dynamic cpu throttling for auto-converge Juan Quintela
2015-09-30 8:56 ` Juan Quintela [this message]
2015-09-30 8:56 ` [Qemu-devel] [PULL 6/6] migration: Disambiguate MAX_THROTTLE Juan Quintela
2015-10-01 11:01 ` [Qemu-devel] [PULL 0/6] Migration pull request Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1443603366-4686-6-git-send-email-quintela@redhat.com \
--to=quintela@redhat.com \
--cc=amit.shah@redhat.com \
--cc=dgilbert@redhat.com \
--cc=jjherne@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).