[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: |
Wanlong Gao |
Subject: |
Re: [Qemu-devel] [PATCH V5 11/12] NUMA: add qmp command query-numa |
Date: |
Wed, 17 Jul 2013 21:24:19 +0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 |
On 07/17/2013 08:41 PM, Eric Blake wrote:
> 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/
OK.
>
>> +#
>> +# @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/
OK.
>
>> +#
>> +# @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).
Yeah, got it.
>
>> +
>> +##
>> +# @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.
Yeah, got it. Thank you very much for your review.
Wanlong Gao
>
- Re: [Qemu-devel] [PATCH V5 06/12] NUMA: parse guest numa nodes memory policy, (continued)
- [Qemu-devel] [PATCH V5 04/12] NUMA: Add numa_info structure to contain numa nodes info, Wanlong Gao, 2013/07/17
- [Qemu-devel] [PATCH V5 08/12] NUMA: set guest numa nodes memory policy, Wanlong Gao, 2013/07/17
- [Qemu-devel] [PATCH V5 09/12] NUMA: add qmp command set-mem-policy to set memory policy for NUMA node, Wanlong Gao, 2013/07/17
- [Qemu-devel] [PATCH V5 12/12] NUMA: convert hmp command info_numa to use qmp command query_numa, Wanlong Gao, 2013/07/17
- [Qemu-devel] [PATCH V5 10/12] NUMA: add hmp command set-mem-policy, Wanlong Gao, 2013/07/17
- [Qemu-devel] [PATCH V5 11/12] NUMA: add qmp command query-numa, Wanlong Gao, 2013/07/17