From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRuxT-00035D-8y for qemu-devel@nongnu.org; Thu, 03 Oct 2013 22:17:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VRuxO-0003r9-KK for qemu-devel@nongnu.org; Thu, 03 Oct 2013 22:17:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:6263) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRuxO-0003qt-CB for qemu-devel@nongnu.org; Thu, 03 Oct 2013 22:17:30 -0400 Date: Thu, 3 Oct 2013 21:04:50 -0300 From: Marcelo Tosatti Message-ID: <20131004000450.GA14997@amt.cnet> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20131003021329.GA19440@amt.cnet> 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, hutao@cn.fujitsu.com, qemu-devel@nongnu.org, peter.huangpeng@huawei.com, bsd@redhat.com, y-goto@jp.fujitsu.com, pbonzini@redhat.com, lcapitulino@redhat.com, lersek@redhat.com, afaerber@suse.de On Wed, Oct 02, 2013 at 11:13:29PM -0300, Marcelo Tosatti wrote: > 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? 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. > 2) > > Have you tested the patchset with hugetlbfs (-mem-path) backing ? >