[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: |
Marcelo Tosatti |
Subject: |
Re: [Qemu-devel] [PATCH V13 10/13] NUMA: add qmp command set-mem-policy to set memory policy for NUMA node |
Date: |
Thu, 3 Oct 2013 21:04:50 -0300 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, Oct 02, 2013 at 11:13:29PM -0300, Marcelo Tosatti wrote:
> 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 <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.
> 2)
>
> Have you tested the patchset with hugetlbfs (-mem-path) backing ?
>