From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60096) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzRgX-0007cI-Q7 for qemu-devel@nongnu.org; Wed, 17 Jul 2013 09:22:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UzRgW-0003Bp-2r for qemu-devel@nongnu.org; Wed, 17 Jul 2013 09:22:25 -0400 Received: from [222.73.24.84] (port=46981 helo=song.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzRgV-0003BH-Mw for qemu-devel@nongnu.org; Wed, 17 Jul 2013 09:22:23 -0400 Message-ID: <51E69A84.4050400@cn.fujitsu.com> Date: Wed, 17 Jul 2013 21:22:12 +0800 From: Wanlong Gao MIME-Version: 1.0 References: <1374053373-30499-1-git-send-email-gaowanlong@cn.fujitsu.com> <1374053373-30499-10-git-send-email-gaowanlong@cn.fujitsu.com> <51E68FBB.7080401@redhat.com> In-Reply-To: <51E68FBB.7080401@redhat.com> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH V5 09/12] NUMA: add qmp command set-mem-policy to set memory policy for NUMA node 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:36 PM, Eric Blake wrote: > On 07/17/2013 03:29 AM, Wanlong Gao wrote: >> This QMP command allows user set guest node's memory policy >> through the QMP protocol. The qmp-shell command is like: >> set-mem-policy nodeid=0 policy=membind host-nodes=0-1 >> >> Signed-off-by: Wanlong Gao >> --- >> numa.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ >> qapi-schema.json | 19 +++++++++++++++++++ >> qmp-commands.hx | 35 +++++++++++++++++++++++++++++++++++ >> 3 files changed, 109 insertions(+) >> > >> +++ b/qapi-schema.json >> @@ -3729,3 +3729,22 @@ >> '*size': 'size', >> '*policy': 'str', >> '*host-nodes': 'str' }} >> + >> +## >> +# @set-mem-policy: >> +# >> +# Set the host memory binding policy for guest NUMA node. >> +# >> +# @nodeid: The node ID of guest NUMA node to set memory policy to. >> +# >> +# @policy: #optional The memory policy to be set (default 'default'). > > Needs to be an enum type, not an open-coded 'str'. Probably the same > enum type as you add for patch 6/12. OK. > >> +# >> +# @host-nodes: #optional The host nodes range for memory policy. > > Again, how is this string interpreted; and should it be an array? OK, will take care of this. Thanks for your review. Wanlong Gao > >> +# >> +# Returns: Nothing on success >> +# >> +# Since: 1.6 >> +## >> +{ 'command': 'set-mem-policy', >> + 'data': {'nodeid': 'int', '*policy': 'str', >> + '*host-nodes': 'str'} } >