qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH V13 10/13] NUMA: add qmp command set-mem-policy


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH V13 10/13] NUMA: add qmp command set-mem-policy to set memory policy for NUMA node
Date: Fri, 04 Oct 2013 10:13:31 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9

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 <address@hidden>
>>> > > Signed-off-by: Wanlong Gao <address@hidden>
>> > 
>> > 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]