From 0895a0e75d13874254218e16dc66dcad673671d3 Mon Sep 17 00:00:00 2001 From: Daniel Henrique Barboza Date: Wed, 1 Apr 2020 07:56:37 -0300 Subject: [PATCH] formatdomain.html.in: fix 'sockets' info in topology element In the 'topology' element it is mentioned, regarding the sockets value, "They refer to the total number of CPU sockets". This is not accurate. What we're doing is calculating the number of sockets per NUMA node, which can be checked in the current implementation of virHostCPUGetInfoPopulateLinux(). Calculating the total number of sockets would break the topology sanity check nodes*sockets*cores*threads=online_cpus. This documentation fix is important to avoid user confusion when seeing the output of 'virsh capabilities' and expecting it to be equal to the output of 'lscpu'. E.g in a Power 9 host this 'lscpu' output: Architecture: ppc64le Byte Order: Little Endian CPU(s): 160 On-line CPU(s) list: 0-159 Thread(s) per core: 4 Core(s) per socket: 20 Socket(s): 2 NUMA node(s): 2 Model: 2.2 (pvr 004e 1202) Model name: POWER9, altivec supported And this XML output from virsh capabilities: ppc64le POWER9 IBM (...) Both are correct, as long as we mention in the Libvirt documentation that 'sockets' in the topology element represents the number of sockets per NUMA node. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Michal Privoznik --- docs/formatdomain.html.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index fbffb16866..d56600dc18 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -1675,9 +1675,9 @@
The topology element specifies requested topology of virtual CPU provided to the guest. Four attributes, sockets, dies, cores, and threads, - accept non-zero positive integer values. They refer to the total number - of CPU sockets, number of dies per socket, number of cores per die, and - number of threads per core, respectively. The dies + accept non-zero positive integer values. They refer to the number of + CPU sockets per NUMA node, number of dies per socket, number of cores + per die, and number of threads per core, respectively. The dies attribute is optional and will default to 1 if omitted, while the other attributes are all mandatory. Hypervisors may require that the maximum number of vCPUs specified by the cpus element equals to