From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50973) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VS0kF-0006LC-2C for qemu-devel@nongnu.org; Fri, 04 Oct 2013 04:28:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VS0kA-0004ys-Fk for qemu-devel@nongnu.org; Fri, 04 Oct 2013 04:28:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32163) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VS0kA-0004yg-7k for qemu-devel@nongnu.org; Fri, 04 Oct 2013 04:28:14 -0400 Message-ID: <524E78AB.2040708@redhat.com> Date: Fri, 04 Oct 2013 10:13:31 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1379387785-14554-1-git-send-email-gaowanlong@cn.fujitsu.com> <1379387785-14554-11-git-send-email-gaowanlong@cn.fujitsu.com> <20131003021329.GA19440@amt.cnet> <20131004000450.GA14997@amt.cnet> In-Reply-To: <20131004000450.GA14997@amt.cnet> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH V13 10/13] NUMA: add qmp command set-mem-policy to set memory policy for NUMA node List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcelo Tosatti Cc: aliguori@us.ibm.com, drjones@redhat.com, ehabkost@redhat.com, hutao@cn.fujitsu.com, qemu-devel@nongnu.org, peter.huangpeng@huawei.com, bsd@redhat.com, y-goto@jp.fujitsu.com, lcapitulino@redhat.com, lersek@redhat.com, afaerber@suse.de, Wanlong Gao Il 04/10/2013 02:04, Marcelo Tosatti ha scritto: >>> > > 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 relative=true host-nodes=0-1 >>> > > >>> > > Reviewed-by: Luiz Capitulino >>> > > Signed-off-by: Wanlong Gao >> > >> > Wanlong Gao, >> > >> > 1) >> > >> > Exposing mbind via QMP/HMP on a live guest is interesting because, >> > see mbind manpage: >> > >> > "By default, mbind() only has an effect for new allocations; >> > if the pages inside the range have been already touched before >> > setting the policy, then the policy has no effect. This default >> > behavior may be overridden by the MPOL_MF_MOVE and >> > MPOL_MF_MOVE_ALL flags described below." >> > >> > This means that executing set-mem-policy on a live guest is >> > unpredictable: it depends on which pages have been faulted in already. >> > >> > Should the command be restricted to offline guests? > In fact, unless there is a missing point, it should be removed: to solve > the device assignment case (memory pinning), mbind must be executed before > the memory regions are registered. > Right. We can add the command back later as memory-add, together with memory hotplug. Paolo