All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wanlong Gao <gaowanlong@cn.fujitsu.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>
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, lcapitulino@redhat.com, lersek@redhat.com,
	afaerber@suse.de, Wanlong Gao <gaowanlong@cn.fujitsu.com>
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	[thread overview]
Message-ID: <52520E51.5080404@cn.fujitsu.com> (raw)
In-Reply-To: <524E78AB.2040708@redhat.com>

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 <lcapitulino@redhat.com>
>>>>>> Signed-off-by: Wanlong Gao <gaowanlong@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.

OK, will remove the command in this patch set.

Thanks,
Wanlong Gao

> 
> Paolo
> 

  reply	other threads:[~2013-10-07  1:31 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-17  3:16 [Qemu-devel] [PATCH V13 00/13] Add support for binding guest numa nodes to host numa nodes Wanlong Gao
2013-09-17  3:16 ` [Qemu-devel] [PATCH V13 01/13] NUMA: move numa related code to new file numa.c Wanlong Gao
2013-09-17  3:16 ` [Qemu-devel] [PATCH V13 02/13] NUMA: check if the total numa memory size is equal to ram_size Wanlong Gao
2013-09-17  3:16 ` [Qemu-devel] [PATCH V13 03/13] NUMA: Add numa_info structure to contain numa nodes info Wanlong Gao
2013-09-17  3:16 ` [Qemu-devel] [PATCH V13 04/13] NUMA: convert -numa option to use OptsVisitor Wanlong Gao
2013-09-17  3:16 ` [Qemu-devel] [PATCH V13 05/13] NUMA: introduce NumaMemOptions Wanlong Gao
2013-09-17  3:16 ` [Qemu-devel] [PATCH V13 06/13] NUMA: add "-numa mem," options Wanlong Gao
2013-09-17  3:16 ` [Qemu-devel] [PATCH V13 07/13] NUMA: expand MAX_NODES from 64 to 128 Wanlong Gao
2013-09-17  3:16 ` [Qemu-devel] [PATCH V13 08/13] NUMA: parse guest numa nodes memory policy Wanlong Gao
2013-09-17  3:16 ` [Qemu-devel] [PATCH V13 09/13] NUMA: set " Wanlong Gao
2013-09-17  3:16 ` [Qemu-devel] [PATCH V13 10/13] NUMA: add qmp command set-mem-policy to set memory policy for NUMA node Wanlong Gao
2013-10-03  2:13   ` Marcelo Tosatti
2013-10-04  0:04     ` Marcelo Tosatti
2013-10-04  8:13       ` Paolo Bonzini
2013-10-07  1:28         ` Wanlong Gao [this message]
2013-09-17  3:16 ` [Qemu-devel] [PATCH V13 11/13] NUMA: add hmp command set-mem-policy Wanlong Gao
2013-09-17  3:16 ` [Qemu-devel] [PATCH V13 12/13] NUMA: add qmp command query-numa Wanlong Gao
2013-09-17  3:16 ` [Qemu-devel] [PATCH V13 13/13] NUMA: convert hmp command info_numa to use qmp command query_numa Wanlong Gao
2013-09-25  1:28 ` [Qemu-devel] [PATCH V13 00/13] Add support for binding guest numa nodes to host numa nodes Wanlong Gao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52520E51.5080404@cn.fujitsu.com \
    --to=gaowanlong@cn.fujitsu.com \
    --cc=afaerber@suse.de \
    --cc=aliguori@us.ibm.com \
    --cc=bsd@redhat.com \
    --cc=drjones@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=hutao@cn.fujitsu.com \
    --cc=lcapitulino@redhat.com \
    --cc=lersek@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.huangpeng@huawei.com \
    --cc=qemu-devel@nongnu.org \
    --cc=y-goto@jp.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.