[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: |
Wanlong Gao |
Subject: |
Re: [Qemu-devel] [PATCH V13 10/13] NUMA: add qmp command set-mem-policy to set memory policy for NUMA node |
Date: |
Mon, 07 Oct 2013 09:28:49 +0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9 |
On 10/04/2013 04:13 PM, Paolo Bonzini wrote:
> 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.
OK, will remove the command in this patch set.
Thanks,
Wanlong Gao
>
> Paolo
>