[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2.1 28/28] qmp: add query-memdev
From: |
Hu Tao |
Subject: |
Re: [Qemu-devel] [PATCH 2.1 28/28] qmp: add query-memdev |
Date: |
Wed, 5 Mar 2014 11:50:51 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Tue, Mar 04, 2014 at 07:11:53PM +0100, Paolo Bonzini wrote:
> Il 04/03/2014 18:37, Eric Blake ha scritto:
> >On 03/04/2014 07:00 AM, Paolo Bonzini wrote:
> >>From: Hu Tao <address@hidden>
> >>
> >>Add qmp command query-memdev to query for information
> >>of memory devices
> >>
> >>Signed-off-by: Hu Tao <address@hidden>
> >>[Use QMP visitors instead of String visitors. - Paolo]
> >>Signed-off-by: Paolo Bonzini <address@hidden>
> >>---
> >> numa.c | 64
> >> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> >> qapi-schema.json | 31 +++++++++++++++++++++++++++
> >> qmp-commands.hx | 32 ++++++++++++++++++++++++++++
> >> 3 files changed, 127 insertions(+)
> >>
> >
> >>+++ b/qapi-schema.json
> >>@@ -4576,3 +4576,34 @@
> >> ##
> >> { 'enum': 'HostMemPolicy',
> >> 'data': [ 'default', 'preferred', 'membind', 'interleave' ] }
> >>+
> >>+##
> >>+# @Memdev:
> >>+#
> >>+# Information of memory device
> >>+#
> >>+# @size: memory device size
> >>+#
> >>+# @host-nodes: host nodes for its memory policy
> >>+#
> >>+# @policy: memory policy of memory device
> >>+#
> >>+# Since: 2.1
> >>+##
> >>+
> >>+{ 'type': 'Memdev',
> >>+ 'data': {
> >>+ 'size': 'size',
> >>+ 'host-nodes': ['uint16'],
> >>+ 'policy': 'str' }}
> >
> >Why is policy 'str', when you just defined 'HostMemPolicy' as an enum in
> >the previous patch? Should this be using the enum?
>
> Good catch.
>
> >
> >>+<- { "return": [
> >>+ {
> >>+ "size": 536870912,
> >>+ "host-nodes": [0, 1],
> >>+ "policy": "bind"
> >
> >"bind" is not one of the values of HostMemPolicy - is that missing from
> >patch 27/28?
>
> Should be membind.
How about change it into bind to keep in line with MPOL_BIND?
- [Qemu-devel] [PATCH 2.1 22/28] hostmem: separate allocation from UserCreatable complete method, (continued)
- [Qemu-devel] [PATCH 2.1 22/28] hostmem: separate allocation from UserCreatable complete method, Paolo Bonzini, 2014/03/04
- [Qemu-devel] [PATCH 2.1 23/28] hostmem: add merge and dump properties, Paolo Bonzini, 2014/03/04
- [Qemu-devel] [PATCH 2.1 26/28] configure: add Linux libnuma detection, Paolo Bonzini, 2014/03/04
- [Qemu-devel] [PATCH 2.1 24/28] hostmem: allow preallocation of any memory region, Paolo Bonzini, 2014/03/04
- [Qemu-devel] [PATCH 2.1 27/28] hostmem: add properties for NUMA memory policy, Paolo Bonzini, 2014/03/04
- [Qemu-devel] [PATCH 2.1 25/28] hostmem: add property to map memory with MAP_SHARED, Paolo Bonzini, 2014/03/04
- [Qemu-devel] [PATCH 2.1 28/28] qmp: add query-memdev, Paolo Bonzini, 2014/03/04
- Re: [Qemu-devel] [PATCH 2.1 28/28] qmp: add query-memdev, Hu Tao, 2014/03/04
Re: [Qemu-devel] [PATCH 2.1 00/28] Current state of NUMA series, and hostmem improvements, Andreas Färber, 2014/03/05
- Re: [Qemu-devel] [PATCH 2.1 00/28] Current state of NUMA series, and hostmem improvements, Paolo Bonzini, 2014/03/05
- Re: [Qemu-devel] [PATCH 2.1 00/28] Current state of NUMA series, and hostmem improvements, Andreas Färber, 2014/03/07
- Re: [Qemu-devel] [PATCH 2.1 00/28] Current state of NUMA series, and hostmem improvements, Paolo Bonzini, 2014/03/07
- Re: [Qemu-devel] [PATCH 2.1 00/28] Current state of NUMA series, and hostmem improvements, Igor Mammedov, 2014/03/07
- Re: [Qemu-devel] [PATCH 2.1 00/28] Current state of NUMA series, and hostmem improvements, Paolo Bonzini, 2014/03/07
- Re: [Qemu-devel] [PATCH 2.1 00/28] Current state of NUMA series, and hostmem improvements, Igor Mammedov, 2014/03/07