qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH V5 11/12] NUMA: add qmp command query-numa


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH V5 11/12] NUMA: add qmp command query-numa
Date: Wed, 17 Jul 2013 06:41:12 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7

On 07/17/2013 03:29 AM, Wanlong Gao wrote:
> Add qmp command query-numa to show guest NUMA information.
> 
> Signed-off-by: Wanlong Gao <address@hidden>
> ---
>  numa.c           | 78 
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  qapi-schema.json | 34 ++++++++++++++++++++++++
>  qmp-commands.hx  | 49 +++++++++++++++++++++++++++++++++++
>  3 files changed, 161 insertions(+)

Focusing on just the interface...

> +++ b/qapi-schema.json
> @@ -3748,3 +3748,37 @@
>  { 'command': 'set-mem-policy',
>    'data': {'nodeid': 'int', '*policy': 'str',
>             '*host-nodes': 'str'} }
> +##
> +# @NUMAInfo:
> +#
> +# Information about guest NUMA nodes
> +#
> +# @nodeid: NUMA node ID
> +#
> +# @cpus: VCPUs contained to this node

s/to/in/

> +#
> +# @memory: memory size of this node

In what unit? Preferably bytes, please (although your example listed
512, which is awfully small).  HMP can round to nearest k or M, but QMP
should be precise.

> +#
> +# @policy: memory policy of this node
> +#
> +# @relative: if host nodes is relative for memory policy

s/is/are/

> +#
> +# @host-nodes: host nodes for its memory policy
> +#
> +# Since: 1.6
> +#
> +##
> +{ 'type': 'NUMAInfo',
> +  'data': {'nodeid': 'int', 'cpus': ['int'], 'memory': 'int',
> +           'policy': 'str', 'relative': 'bool', 'host-nodes': ['int'] }}

'policy' needs to be an 'enum' type (the same one as I have requested
you to use in your other patches).

> +
> +##
> +# @query-numa:
> +#
> +# Returns a list of information about each guest node.
> +#
> +# Returns: a list of @NUMAInfo for each guest node
> +#
> +# Since: 1.6
> +##
> +{ 'command': 'query-numa', 'returns': ['NUMAInfo'] }

Seems like a reasonable command.  As in 1/12, you may end up using
'Since: 1.7' by the time this patch is actually taken.

-- 
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]