From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57477) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzRXf-0003pr-CY for qemu-devel@nongnu.org; Wed, 17 Jul 2013 09:13:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UzRXd-00082V-TL for qemu-devel@nongnu.org; Wed, 17 Jul 2013 09:13:15 -0400 Received: from [222.73.24.84] (port=36845 helo=song.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzRXd-00081M-E1 for qemu-devel@nongnu.org; Wed, 17 Jul 2013 09:13:13 -0400 Message-ID: <51E69858.6090702@cn.fujitsu.com> Date: Wed, 17 Jul 2013 21:12:56 +0800 From: Wanlong Gao 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> <51E68EB9.1070306@redhat.com> In-Reply-To: <51E68EB9.1070306@redhat.com> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH V5 06/12] NUMA: parse guest numa nodes memory policy Reply-To: gaowanlong@cn.fujitsu.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake 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, Wanlong Gao On 07/17/2013 08:31 PM, Eric Blake wrote: > On 07/17/2013 03:29 AM, Wanlong Gao wrote: >> The memory policy setting format is like: >> policy={membind|interleave|preferred},host-node=[+|!]{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=0,cpus=0 \ >> -numa node,nodeid=1,cpus=1 \ >> -numa mem,nodeid=0,size=1G,policy=membind,host-nodes=0-1 \ >> -numa mem,nodeid=1,size=1G,policy=interleave,host-nodes=!1 >> >> 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'. OK, will follow this. Luiz also suggested like this. > >> + '*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? Will try to use array here, thank you for your suggestion. Thanks, Wanlong Gao >