qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Cc: aliguori@us.ibm.com, drjones@redhat.com, ehabkost@redhat.com,
	qemu-devel@nongnu.org, hutao@cn.fujitsu.com,
	peter.huangpeng@huawei.com, lcapitulino@redhat.com,
	bsd@redhat.com, pbonzini@redhat.com, y-goto@jp.fujitsu.com,
	lersek@redhat.com, afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH V13 10/13] NUMA: add qmp command set-mem-policy to set memory policy for NUMA node
Date: Wed, 2 Oct 2013 23:13:29 -0300	[thread overview]
Message-ID: <20131003021329.GA19440@amt.cnet> (raw)
In-Reply-To: <1379387785-14554-11-git-send-email-gaowanlong@cn.fujitsu.com>

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

2)

Have you tested the patchset with hugetlbfs (-mem-path) backing ?

  reply	other threads:[~2013-10-03  2:16 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 [this message]
2013-10-04  0:04     ` Marcelo Tosatti
2013-10-04  8:13       ` Paolo Bonzini
2013-10-07  1:28         ` Wanlong Gao
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=20131003021329.GA19440@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=afaerber@suse.de \
    --cc=aliguori@us.ibm.com \
    --cc=bsd@redhat.com \
    --cc=drjones@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=gaowanlong@cn.fujitsu.com \
    --cc=hutao@cn.fujitsu.com \
    --cc=lcapitulino@redhat.com \
    --cc=lersek@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).