qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [v3 13/13] migration: Add command to query migration pa


From: Eric Blake
Subject: Re: [Qemu-devel] [v3 13/13] migration: Add command to query migration parameter
Date: Fri, 23 Jan 2015 08:47:50 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

On 12/11/2014 06:29 PM, Liang Li wrote:
> Add the qmp and hmp commands to query the parameters used in live
> migration.
> 
> Signed-off-by: Liang Li <address@hidden>
> Signed-off-by: Yang Zhang <address@hidden>
> ---
>  hmp-commands.hx  |  2 ++
>  hmp.c            | 19 +++++++++++++++++++
>  hmp.h            |  1 +
>  migration.c      | 25 +++++++++++++++++++++++++
>  monitor.c        |  7 +++++++
>  qapi-schema.json | 10 ++++++++++
>  qmp-commands.hx  | 24 ++++++++++++++++++++++++
>  7 files changed, 88 insertions(+)
> 

> +    if (params) {
> +        monitor_printf(mon, "parameters: ");
> +        for (p = params; p; p = p->next) {
> +            monitor_printf(mon, "%s: %d ",
> +                           MigrationParameter_lookup[p->value->parameter],
> +                           (int)p->value->value);

Why are you casting to 'int'? I'm worried that this will fail if you
ever have a 64-bit parameter, or if we ever have a non-integral parameter.

> +++ b/qapi-schema.json
> @@ -584,6 +584,16 @@
>  { 'command': 'migrate-set-parameters',
>    'data': { 'parameters': ['MigrationParameterStatus'] } }
>  ##
> +# @query-migrate-parameters
> +#
> +# Returns information about the current migration parameters status
> +#
> +# Returns: @MigrationParametersStatus
> +#
> +# Since: 2.3
> +##
> +{ 'command': 'query-migrate-parameters', 'returns':   
> ['MigrationParameterStatus']}

Unusual spacing.  Line is longer than 80 columns.


> +query-migrate-parameters
> +------------------------
> +
> +Query current migration parameters
> +
> +- "parameters": migration parameters value
> +         - "compress-level" : compress level value (json-int)

Is it worth giving the example with all three defined parameters, rather
than truncating it to just one?

Again, see my comments on 12/13 about possibly squashing these together,
and/or using a union to make it obvious that we might support
non-integral parameters in the future.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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