libxl: vnuma topology configuration parser and doc
PATCH RESEND v7 9/9 libxl: vnuma topology configuration parser and doc
Parses vnuma topoplogy number of nodes and memory ranges. If not defined, initializes vnuma with only one node and default topology. This one node covers all domain memory and all vcpus assigned to it.
Signed-off-by Elena Ufimtseva <[email protected]>
--- docs/man/xl.cfg.pod.5 | 77 +++++++++ tools/libxl/xl_cmdimpl.c | 425 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 502 insertions(+)
docs/man/xl.cfg.pod.5 +77 -0
@@ -264,6 +264,83 @@ if the values of B<memory=> and B<maxmem=> differ. A "pre-ballooned" HVM guest needs a balloon driver, without a balloon driver it will crash. +=item B<vnuma_nodes=N> + +Number of vNUMA nodes the guest will be initialized with on boot. +PV guest by default will have one vnuma node. + +=item B<vnuma_mem=[vmem1, vmem2, ...]> + +List of memory sizes for each node, defined in MBytes. Number of items listed must +match nr_vnodes. If the sum of all vnode memories does not match the domain memory +or there are missing nodes, it will fail. +If not specified, memory will be equally split between vnodes. Current minimum +memory size for one node is limited by 32MB. + +Example: vnuma_mem=[1024, 1024, 2048, 2048] +Total amount of memory in guest: 6GB + +=item B<vdistance=[d1, d2]> + +Defines the distance table for vNUMA nodes. NUMA topology distances are +represented by two dimensional square matrix. One element of it [i,j] is +a distance between nodes i and j. Trivial case is where all diagonal elements +are equal and matrix is symmetrical. vdistance configuration option allows +to define two values d1 and d2. d1 will be used for all diagonal elements of +distance matrix. All other values will be equal to d2 value. Usually distances +are multiple of 10 in Linux and same rule used here. +If not specified, the default constants values will be used for distance, +e.g. [10, 20]. For one node default distance is [10]; + +Examples: +vnodes = 3 +vdistance=[10, 20] +will create this distance table (this is default setting as well): +[10, 20, 20] +[20, 10, 20] +[20, 20, 10] + +=item B<vnuma_vcpumap=[node_nr, node_nr, ...]> + +Defines vcpu to vnode mapping as a list of integers. The position in the list +is a vcpu number, and the value is the vnode number to which the vcpu will be +assigned to. +Current limitations: +- vNUMA node must have at least one vcpu, otherwise default vcpu_to_vnode will be used. +- Total number of vnodes cannot be bigger then number of vcpus. + +Example: +Map of 4 vcpus to 2 vnodes: +0,1 vcpu -> vnode0 +2,3 vcpu -> vnode1: + +vnuma_vcpumap = [0, 0, 1, 1] + 4 vcpus here - 0 1 2 3 + +=item B<vnuma_vnodemap=[p1, p2, ..., pn]> + +List of physical node numbers, position in the list represents vnode number. +Used for manual placement of vnuma nodes to physical NUMA nodes. +Will not be used if automatic numa placement is active. + +Example: +assume NUMA machine with 4 physical nodes. Placing vnuma node 0 to pnode 2, +vnuma node 1 to pnode 3: +vnode0 -> pnode2 +vnode1 -> pnode3 + +vnuma_vnodemap=[2, 3] +first vnode will be placed on node 2, second on node 3. + +=item B<vnuma_autoplacement=[0|1]> + +If set to 1 and automatic NUMA placement is enabled, automatically will find the best +physical node to place vnuma nodes on. vnuma_vnodemap will be ignored. Automatic NUMA +placement is enabled if domain has no pinned cpus. +If vnuma_autoplacement is set to 0, then the vnodes will be placed on NUMA nodes set +in vnuma_vnodemap if there is enough memory on physical nodes. If not, then the allocation +will be made on any of the available node and be placed on multiple physical NUMA nodes. + =back =head3 Event Actions
tools/libxl/xl_cmdimpl.c +425 -0
443 lines not on this page · raw message
Signature · 1 line
1.7.10.4