From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55064) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VSzfH-0007xc-B1 for qemu-devel@nongnu.org; Sun, 06 Oct 2013 21:31:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VSzfC-0005al-Nk for qemu-devel@nongnu.org; Sun, 06 Oct 2013 21:31:15 -0400 Received: from [222.73.24.84] (port=37359 helo=song.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VSzfC-0005SL-9Q for qemu-devel@nongnu.org; Sun, 06 Oct 2013 21:31:10 -0400 Message-ID: <52520E51.5080404@cn.fujitsu.com> Date: Mon, 07 Oct 2013 09:28:49 +0800 From: Wanlong Gao 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> <524E78AB.2040708@redhat.com> In-Reply-To: <524E78AB.2040708@redhat.com> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Qemu-devel] [PATCH V13 10/13] 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: Paolo Bonzini , 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 On 10/04/2013 04:13 PM, Paolo Bonzini wrote: > 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. OK, will remove the command in this patch set. Thanks, Wanlong Gao > > Paolo >