From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: "Jason J. Herne" <jjherne@linux.vnet.ibm.com>
Cc: quintela@redhat.com, qemu-devel@nongnu.org, dgilbert@redhat.com,
borntraeger@de.ibm.com, amit.shah@redhat.com, afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH v3 4/5] qmp/hmp: Add throttle ratio to query-migrate and info migrate
Date: Fri, 26 Jun 2015 19:32:58 +0100 [thread overview]
Message-ID: <20150626183257.GL2186@work-vm> (raw)
In-Reply-To: <1435254377-13322-5-git-send-email-jjherne@linux.vnet.ibm.com>
* Jason J. Herne (jjherne@linux.vnet.ibm.com) wrote:
> 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>
> ---
> 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 eb65998..36bc76e 100644
> --- a/hmp.c
> +++ b/hmp.c
> @@ -229,6 +229,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 7708c54..b29450a 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -274,6 +274,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 7dd324e..cd36256 100644
> --- a/qapi-schema.json
> +++ b/qapi-schema.json
> @@ -474,6 +474,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.4)
> +#
> # Since: 0.14.0
> ##
> { 'struct': 'MigrationInfo',
> @@ -483,7 +487,8 @@
> '*total-time': 'int',
> '*expected-downtime': 'int',
> '*downtime': 'int',
> - '*setup-time': 'int'} }
> + '*setup-time': 'int',
> + '*x-cpu-throttle-percentage': 'int'} }
>
> ##
> # @query-migrate
> --
> 1.9.1
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2015-06-26 18:33 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-25 17:46 [Qemu-devel] [PATCH v3 0/5] migration: Dynamic cpu throttling for auto-converge Jason J. Herne
2015-06-25 17:46 ` [Qemu-devel] [PATCH v3 1/5] cpu: Provide vcpu throttling interface Jason J. Herne
2015-06-26 18:07 ` Dr. David Alan Gilbert
2015-06-26 19:02 ` Jason J. Herne
2015-06-29 9:27 ` Dr. David Alan Gilbert
2015-06-29 14:42 ` Jason J. Herne
2015-07-01 14:03 ` Paolo Bonzini
2015-07-02 14:25 ` Jason J. Herne
2015-07-02 14:27 ` Paolo Bonzini
2015-07-02 16:33 ` Jason J. Herne
2015-07-02 16:34 ` Paolo Bonzini
2015-07-01 13:57 ` Paolo Bonzini
2015-06-25 17:46 ` [Qemu-devel] [PATCH v3 2/5] migration: Parameters for auto-converge cpu throttling Jason J. Herne
2015-06-26 17:20 ` Dr. David Alan Gilbert
2015-06-25 17:46 ` [Qemu-devel] [PATCH v3 3/5] migration: Dynamic cpu throttling for auto-converge Jason J. Herne
2015-06-26 17:54 ` Dr. David Alan Gilbert
2015-06-26 18:42 ` Jason J. Herne
2015-06-26 19:07 ` Jason J. Herne
2015-06-25 17:46 ` [Qemu-devel] [PATCH v3 4/5] qmp/hmp: Add throttle ratio to query-migrate and info migrate Jason J. Herne
2015-06-26 18:32 ` Dr. David Alan Gilbert [this message]
2015-06-25 17:46 ` [Qemu-devel] [PATCH v3 5/5] migration: Disambiguate MAX_THROTTLE Jason J. Herne
2015-06-26 18:36 ` Dr. David Alan Gilbert
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=20150626183257.GL2186@work-vm \
--to=dgilbert@redhat.com \
--cc=afaerber@suse.de \
--cc=amit.shah@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=jjherne@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/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).