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 <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? > 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