qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [RFC PATCH 17/56] migration: Make MigrationStats sizes


From: Juan Quintela
Subject: Re: [Qemu-block] [RFC PATCH 17/56] migration: Make MigrationStats sizes unsigned in QAPI/QMP
Date: Mon, 07 Aug 2017 18:48:59 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Markus Armbruster <address@hidden> wrote:
> Sizes should use QAPI type 'size' (uint64_t).  MigrationStats members
> @transferred, @remaining, @total, @normal-bytes, @page-size are 'int'
> (int64_t).  populate_ram_info(), populate_disk_info() and and many
> places that update them in global variable @ram_counters implicitly
> convert from unsigned types.
>
> Change these MigrationStats members to 'size'.
>
> query-migrate now reports them correctly above 2^63-1 instead of their
> (negative) two's complement.
>
> HMP's "info migrate" already reported them correctly, because it
> printed the signed integer with PRIu64.
>
> Signed-off-by: Markus Armbruster <address@hidden>

Reviewed-by: Juan Quintela <address@hidden>


> ---
>  qapi-schema.json | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/qapi-schema.json b/qapi-schema.json
> index 4a3d07e..2eee676 100644
> --- a/qapi-schema.json
> +++ b/qapi-schema.json
> @@ -620,11 +620,11 @@
>  # Since: 0.14.0
>  ##
>  { 'struct': 'MigrationStats',
> -  'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
> +  'data': {'transferred': 'size', 'remaining': 'size', 'total': 'size' ,
>             'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
> -           'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
> +           'normal-bytes': 'size', 'dirty-pages-rate' : 'int',
>             'mbps' : 'number', 'dirty-sync-count' : 'int',
> -           'postcopy-requests' : 'int', 'page-size' : 'int' } }
> +           'postcopy-requests' : 'int', 'page-size' : 'size' } }

I would expect page-size to not be so big, but who knows O:-)


>  
>  ##
>  # @XBZRLECacheStats:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]