From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44408) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzQto-0003gX-Qv for qemu-devel@nongnu.org; Wed, 17 Jul 2013 08:32:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UzQtl-0000oN-VD for qemu-devel@nongnu.org; Wed, 17 Jul 2013 08:32:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzQtl-0000oH-Me for qemu-devel@nongnu.org; Wed, 17 Jul 2013 08:32:01 -0400 Message-ID: <51E68EB9.1070306@redhat.com> Date: Wed, 17 Jul 2013 06:31:53 -0600 From: Eric Blake MIME-Version: 1.0 References: <1374053373-30499-1-git-send-email-gaowanlong@cn.fujitsu.com> <1374053373-30499-7-git-send-email-gaowanlong@cn.fujitsu.com> In-Reply-To: <1374053373-30499-7-git-send-email-gaowanlong@cn.fujitsu.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2RRRKIRLGOQFSFVCTTAQK" Subject: Re: [Qemu-devel] [PATCH V5 06/12] NUMA: parse guest numa nodes memory policy 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) ------enig2RRRKIRLGOQFSFVCTTAQK Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/17/2013 03:29 AM, Wanlong Gao wrote: > The memory policy setting format is like: > policy=3D{membind|interleave|preferred},host-node=3D[+|!]{all|N-N} > And we are adding this setting as a suboption of "-numa mem,", > the memory policy then can be set like following: > -numa node,nodeid=3D0,cpus=3D0 \ > -numa node,nodeid=3D1,cpus=3D1 \ > -numa mem,nodeid=3D0,size=3D1G,policy=3Dmembind,host-nodes=3D0-1 \ > -numa mem,nodeid=3D1,size=3D1G,policy=3Dinterleave,host-nodes=3D!1 >=20 > Reviewed-by: Bandan Das > Signed-off-by: Andre Przywara > Signed-off-by: Wanlong Gao > --- > +++ b/qapi-schema.json > @@ -3717,9 +3717,15 @@ > # > # @size: #optional memory size of this node > # > +# @policy: #optional memory policy of this node > +# > +# @host-nodes: #optional host nodes for its memory policy > +# > # Since 1.6 > ## > { 'type': 'NumaMemOptions', > 'data': { > '*nodeid': 'int', > - '*size': 'size' }} > + '*size': 'size', > + '*policy': 'str', What are the valid values for 'policy'? If it is a finite set, please make an 'enum' type that lists the valid values, and make this '*policy':'NumaMemPolicy' rather than a free-form 'str'. > + '*host-nodes': 'str' }} Missing documentation on how this 'str' is formatted, and same concerns as in 1/12 about whether it is the right JSON representation, or whether you have crammed too much information into a single string that now requires post-processing. Why is an array not a better choice? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2RRRKIRLGOQFSFVCTTAQK 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/ iQEcBAEBCAAGBQJR5o65AAoJEKeha0olJ0NqJhwH+gPfUhL1nHzXZsVh/yaRl/dw N1fozBXkICzZShqYy+ZB+OAyZYz440+hKgNFd0fLsgRPBHc0ypOVTxgBWvwBRQ9x HZbFf2Pp1GcmGoM9QGnO/NZy0rXMIDcOBvModprYhAgkxUMJn29x1dCzADnlM/Ol 1ZMXyGirjZwNXz+x6FCJfJY7gRUuA2DYh2y8rhZg4mdvhNZDJXz45GXSHQtGOgRD J1sJT6vqxB6yVPVTxZ9YY2IExfjBxv+nSvAQrf99HCutKGPWMZFwzDk5bLQ6/EeI F7hBGTQ7Qhwmt0ZFbj5ELv3ztRzkmi+XHhIHrszyITKOS1u7thvccuBY3LGH7HU= =2Zn+ -----END PGP SIGNATURE----- ------enig2RRRKIRLGOQFSFVCTTAQK--