From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47865) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzR2s-0007VC-En for qemu-devel@nongnu.org; Wed, 17 Jul 2013 08:41:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UzR2p-0004n7-Pe for qemu-devel@nongnu.org; Wed, 17 Jul 2013 08:41:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59398) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzR2p-0004n0-HN for qemu-devel@nongnu.org; Wed, 17 Jul 2013 08:41:23 -0400 Message-ID: <51E690E8.1050001@redhat.com> Date: Wed, 17 Jul 2013 06:41:12 -0600 From: Eric Blake MIME-Version: 1.0 References: <1374053373-30499-1-git-send-email-gaowanlong@cn.fujitsu.com> <1374053373-30499-12-git-send-email-gaowanlong@cn.fujitsu.com> In-Reply-To: <1374053373-30499-12-git-send-email-gaowanlong@cn.fujitsu.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2IFTPKOELGBXFMMAVXBOS" Subject: Re: [Qemu-devel] [PATCH V5 11/12] NUMA: add qmp command query-numa List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wanlong Gao Cc: aliguori@us.ibm.com, ehabkost@redhat.com, qemu-devel@nongnu.org, lcapitulino@redhat.com, bsd@redhat.com, y-goto@jp.fujitsu.com, pbonzini@redhat.com, peter.huangpeng@huawei.com, lersek@redhat.com, afaerber@suse.de This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2IFTPKOELGBXFMMAVXBOS Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/17/2013 03:29 AM, Wanlong Gao wrote: > Add qmp command query-numa to show guest NUMA information. >=20 > Signed-off-by: Wanlong Gao > --- > 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. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2IFTPKOELGBXFMMAVXBOS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJR5pDoAAoJEKeha0olJ0Nq2agIAIDs3tQaHbcVGuZio9acNqvu QMBvbGJBRh+/Q9j2BI4AKyh7z2GPzZ+zBa0CkQFIDHnKrO1dZXEAU/FSx9OMyUTS BdAW9OkisytQOcvd0cplqBtlfUU/olOa46NRbtjT0MQAF/UwsZ/jeg4Wr1VwkGLw pPyitgP9JTlAs9Uh6AmziI5efKFzwYXuyJ7VvGhhd2OGrB7IsUYuIGK8ZyvMvAmp PJHRj0lVB0IDT2El9nS2EKAIVJup6W/fMkTYtGGHedtzbFoWXlD7A1QLhpttpmGf 56qNjTypGeD2mS+DAshscvJCBse+q7pLeJAr6af5S0Cb7rtIXnsg0oKymf7cxmY= =oZv6 -----END PGP SIGNATURE----- ------enig2IFTPKOELGBXFMMAVXBOS--