[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v15 9/9] Add XBZRLE statistics
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v15 9/9] Add XBZRLE statistics |
Date: |
Thu, 05 Jul 2012 08:20:19 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 |
On 07/05/2012 06:51 AM, Orit Wasserman wrote:
> Signed-off-by: Benoit Hudzia <address@hidden>
> Signed-off-by: Petter Svard <address@hidden>
> Signed-off-by: Aidan Shribman <address@hidden>
> Signed-off-by: Orit Wasserman <address@hidden>
> +++ b/arch_init.c
> @@ -202,8 +202,66 @@ int64_t xbzrle_cache_resize(int64_t new_size)
> return pow2floor(new_size);
> }
>
> +/* accounting */
> +typedef struct AccountingInfo {
The comment didn't add any information. Either drop it, or give a
comment that describes what the accounting is for:
/* accounting for migration statistics */
> + /* display xbzrle cache size */
> + if (migrate_use_xbzrle()) {
> + info->has_cache = true;
> + info->cache = g_malloc0(sizeof(*info->cache));
> + info->cache->cache_size = migrate_xbzrle_cache_size();
> + info->cache->xbzrle_bytes = xbzrle_mig_bytes_transferred();
> + info->cache->xbzrle_pages = xbzrle_mig_pages_transferred();
Why the two lines with two spaces before '='?
> @@ -162,6 +173,8 @@ MigrationInfo *qmp_query_migrate(Error **errp)
> info->ram->total = ram_bytes_total();
> info->ram->total_time = qemu_get_clock_ms(rt_clock)
> - s->total_time;
> + info->ram->duplicate = dup_mig_pages_transferred();
> + info->ram->normal = norm_mig_pages_transferred();
And another two spaces before '='
>
> if (blk_mig_active()) {
> info->has_disk = true;
> @@ -170,6 +183,16 @@ MigrationInfo *qmp_query_migrate(Error **errp)
> info->disk->remaining = blk_mig_bytes_remaining();
> info->disk->total = blk_mig_bytes_total();
> }
> +
> + if (migrate_use_xbzrle()) {
> + info->has_cache = true;
> + info->cache = g_malloc0(sizeof(*info->cache));
> + info->cache->cache_size = migrate_xbzrle_cache_size();
> + info->cache->xbzrle_bytes = xbzrle_mig_bytes_transferred();
> + info->cache->xbzrle_pages = xbzrle_mig_pages_transferred();
and again
> + if (migrate_use_xbzrle()) {
> + info->has_cache = true;
> + info->cache = g_malloc0(sizeof(*info->cache));
> + info->cache->cache_size = migrate_xbzrle_cache_size();
> + info->cache->xbzrle_bytes = xbzrle_mig_bytes_transferred();
> + info->cache->xbzrle_pages = xbzrle_mig_pages_transferred();
and again
> @@ -291,13 +315,16 @@
> # @capabilities: #optional a list describing all the migration capabilities
> # state
> #
> -# Since: 0.14.0, 'capabilities' since 1.2
> +# @cache: #optional @MigrationStats containing detailed XBZRLE migration
> +# statistics
> +#
> +# Since: 0.14.0, 'capabilities' and 'cache' since 1.
s/1.$/1.2/
> +5. Migration is being performed and XBZRLE is active:
> +
> +-> { "execute": "query-migrate" }
> +<- {
> + "return":{
> + "status":"active",
> + "capabilities" : [ { "capability": "xbzrle", "state" : true } ],
> + "ram":{
> + "total":1057024,
> + "remaining":1053304,
> + "transferred":3720
s/$/,/
--
Eric Blake address@hidden +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v15 2/9] Add XBZRLE documentation, (continued)