qemu-options: Rewrite -numa documentation

Rewrite the -numa documentation to clarify what exactly it does.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20170123180632.28942-3-ehabkost@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
Eduardo Habkost 2017-01-23 16:06:32 -02:00
parent 508e038a5d
commit 4b9a5dd762

View File

@ -144,16 +144,34 @@ STEXI
@item -numa node[,mem=@var{size}][,cpus=@var{firstcpu}[-@var{lastcpu}]][,nodeid=@var{node}] @item -numa node[,mem=@var{size}][,cpus=@var{firstcpu}[-@var{lastcpu}]][,nodeid=@var{node}]
@itemx -numa node[,memdev=@var{id}][,cpus=@var{firstcpu}[-@var{lastcpu}]][,nodeid=@var{node}] @itemx -numa node[,memdev=@var{id}][,cpus=@var{firstcpu}[-@var{lastcpu}]][,nodeid=@var{node}]
@findex -numa @findex -numa
Simulate a multi node NUMA system. If @samp{mem}, @samp{memdev} Define a NUMA node and assign RAM and VCPUs to it.
and @samp{cpus} are omitted, resources are split equally. Also, note
that the -@option{numa} option doesn't allocate any of the specified @var{firstcpu} and @var{lastcpu} are CPU indexes. Each
resources. That is, it just assigns existing resources to NUMA nodes. This @samp{cpus} option represent a contiguous range of CPU indexes
means that one still has to use the @option{-m}, @option{-smp} options (or a single VCPU if @var{lastcpu} is omitted). A non-contiguous
to allocate RAM and VCPUs respectively, and possibly @option{-object} set of VCPUs can be represented by providing multiple @samp{cpus}
to specify the memory backend for the @samp{memdev} suboption. options. If @samp{cpus} is omitted on all nodes, VCPUs are automatically
split between them.
For example, the following option assigns VCPUs 0, 1, 2 and 5 to
a NUMA node:
@example
-numa node,cpus=0-2,cpus=5
@end example
@samp{mem} assigns a given RAM amount to a node. @samp{memdev}
assigns RAM from a given memory backend device to a node. If
@samp{mem} and @samp{memdev} are omitted in all nodes, RAM is
split equally between them.
@samp{mem} and @samp{memdev} are mutually exclusive. Furthermore,
if one node uses @samp{memdev}, all of them have to use it.
Note that the -@option{numa} option doesn't allocate any of the
specified resources, it just assigns existing resources to NUMA
nodes. This means that one still has to use the @option{-m},
@option{-smp} options to allocate RAM and VCPUs respectively.
@samp{mem} and @samp{memdev} are mutually exclusive. Furthermore, if one
node uses @samp{memdev}, all of them have to use it.
ETEXI ETEXI
DEF("add-fd", HAS_ARG, QEMU_OPTION_add_fd, DEF("add-fd", HAS_ARG, QEMU_OPTION_add_fd,