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 <lcapitul...@redhat.com> > Signed-off-by: Wanlong Gao <gaowanl...@cn.fujitsu.com>
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 ?