[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2.1 15/28] numa: add -numa node, memdev= option
From: |
Hu Tao |
Subject: |
Re: [Qemu-devel] [PATCH 2.1 15/28] numa: add -numa node, memdev= option |
Date: |
Fri, 7 Mar 2014 13:33:11 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Tue, Mar 04, 2014 at 03:00:43PM +0100, Paolo Bonzini wrote:
> This option provides the infrastructure for binding guest NUMA nodes
> to host NUMA nodes. For example:
>
> -object memory-ram,size=1024M,policy=membind,host-nodes=0,id=ram-node0 \
> -numa node,nodeid=0,cpus=0,memdev=ram-node0 \
> -object memory-ram,size=1024M,policy=interleave,host-nodes=1-3,id=ram-node1 \
> -numa node,nodeid=1,cpus=1,memdev=ram-node1
>
> The option replaces "-numa node,mem=".
>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
> include/sysemu/sysemu.h | 1 +
> numa.c | 63
> +++++++++++++++++++++++++++++++++++++++++++++++--
> qapi-schema.json | 8 ++++++-
> qemu-options.hx | 12 ++++++----
> 4 files changed, 77 insertions(+), 7 deletions(-)
>
> diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
> index 54a6f28..4870129 100644
> --- a/include/sysemu/sysemu.h
> +++ b/include/sysemu/sysemu.h
> @@ -139,6 +139,7 @@ extern int nb_numa_nodes;
> typedef struct node_info {
> uint64_t node_mem;
> DECLARE_BITMAP(node_cpu, MAX_CPUMASK_BITS);
> + struct HostMemoryBackend *node_memdev;
> } NodeInfo;
> extern NodeInfo numa_info[MAX_NODES];
> void set_numa_nodes(void);
> diff --git a/numa.c b/numa.c
> index 930f49d..b00ef90 100644
> --- a/numa.c
> +++ b/numa.c
> @@ -32,6 +32,7 @@
> #include "qapi/dealloc-visitor.h"
> #include "qapi/qmp/qerror.h"
> #include "hw/boards.h"
> +#include "sysemu/hostmem.h"
>
> QemuOptsList qemu_numa_opts = {
> .name = "numa",
> @@ -40,6 +41,8 @@ QemuOptsList qemu_numa_opts = {
> .desc = { { 0 } } /* validated with OptsVisitor */
> };
>
> +static int have_memdevs = -1;
> +
bool?
- Re: [Qemu-devel] [PATCH 2.1 11/28] qmp: improve error reporting for -object and object-add, (continued)
- [Qemu-devel] [PATCH 2.1 12/28] pc: pass QEMUMachineInitArgs to pc_memory_init, Paolo Bonzini, 2014/03/04
- [Qemu-devel] [PATCH 2.1 13/28] numa: introduce memory_region_allocate_system_memory, Paolo Bonzini, 2014/03/04
- [Qemu-devel] [PATCH 2.1 14/28] add memdev backend infrastructure, Paolo Bonzini, 2014/03/04
- [Qemu-devel] [PATCH 2.1 15/28] numa: add -numa node, memdev= option, Paolo Bonzini, 2014/03/04
- [Qemu-devel] [PATCH 2.1 16/28] memory: reorganize file-based allocation, Paolo Bonzini, 2014/03/04
- [Qemu-devel] [PATCH 2.1 17/28] memory: move mem_path handling to memory_region_allocate_system_memory, Paolo Bonzini, 2014/03/04
- [Qemu-devel] [PATCH 2.1 18/28] memory: add error propagation to file-based RAM allocation, Paolo Bonzini, 2014/03/04