From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42027) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRYT3-0003Cb-2n for qemu-devel@nongnu.org; Wed, 02 Oct 2013 22:16:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VRYSy-000813-Gn for qemu-devel@nongnu.org; Wed, 02 Oct 2013 22:16:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24430) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRYSy-00080p-8y for qemu-devel@nongnu.org; Wed, 02 Oct 2013 22:16:36 -0400 Date: Wed, 2 Oct 2013 23:13:29 -0300 From: Marcelo Tosatti Message-ID: <20131003021329.GA19440@amt.cnet> References: <1379387785-14554-1-git-send-email-gaowanlong@cn.fujitsu.com> <1379387785-14554-11-git-send-email-gaowanlong@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1379387785-14554-11-git-send-email-gaowanlong@cn.fujitsu.com> 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: Wanlong Gao Cc: aliguori@us.ibm.com, drjones@redhat.com, ehabkost@redhat.com, qemu-devel@nongnu.org, hutao@cn.fujitsu.com, peter.huangpeng@huawei.com, lcapitulino@redhat.com, bsd@redhat.com, pbonzini@redhat.com, y-goto@jp.fujitsu.com, lersek@redhat.com, afaerber@suse.de On Tue, Sep 17, 2013 at 11:16:22AM +0800, 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 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? 2) Have you tested the patchset with hugetlbfs (-mem-path) backing ?