[libvirt] [PATCH] cpu_conf: add comments about sockets in cpu_conf

From: Chen Hanxiao <chenhanxiao@gmail.com> 'sockets' in output of `virsh capabilities' means the sockets per NUMA node, which is a special case. discuss in: https://www.redhat.com/archives/libvir-list/2012-March/msg01123.html Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com> --- src/conf/cpu_conf.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/conf/cpu_conf.h b/src/conf/cpu_conf.h index e084392..95d6b3e 100644 --- a/src/conf/cpu_conf.h +++ b/src/conf/cpu_conf.h @@ -95,15 +95,15 @@ struct _virCPUFeatureDef { typedef struct _virCPUDef virCPUDef; typedef virCPUDef *virCPUDefPtr; struct _virCPUDef { - int type; /* enum virCPUType */ - int mode; /* enum virCPUMode */ - int match; /* enum virCPUMatch */ + int type; /* enum virCPUType */ + int mode; /* enum virCPUMode */ + int match; /* enum virCPUMatch */ virArch arch; char *model; - char *vendor_id; /* vendor id returned by CPUID in the guest */ - int fallback; /* enum virCPUFallback */ + char *vendor_id; /* vendor id returned by CPUID in the guest */ + int fallback; /* enum virCPUFallback */ char *vendor; - unsigned int sockets; + unsigned int sockets; /* sockets per NUMA node */ unsigned int cores; unsigned int threads; size_t nfeatures; -- 1.8.3.1

On Tue, Oct 18, 2016 at 16:18:10 +0800, Chen Hanxiao wrote:
From: Chen Hanxiao <chenhanxiao@gmail.com>
'sockets' in output of `virsh capabilities' means
You are talking here about virsh capabilities, while the code is about the cpu definition in the domain configuration.
the sockets per NUMA node, which is a special case.
Indeed it is a special case in the capabilities XML. So why are you changing the code relevant to domain definition, where the sockets count is actually the total sockets count?
discuss in: https://www.redhat.com/archives/libvir-list/2012-March/msg01123.html
https://www.redhat.com/archives/libvir-list/2012-March/msg01133.html describes why sockets per NUMA node is not really what we want.
Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com> ---

At 2016-10-18 21:59:44, "Peter Krempa" <pkrempa@redhat.com> wrote:
On Tue, Oct 18, 2016 at 16:18:10 +0800, Chen Hanxiao wrote:
From: Chen Hanxiao <chenhanxiao@gmail.com>
'sockets' in output of `virsh capabilities' means
You are talking here about virsh capabilities, while the code is about the cpu definition in the domain configuration.
the sockets per NUMA node, which is a special case.
Indeed it is a special case in the capabilities XML. So why are you changing the code relevant to domain definition, where the sockets count is actually the total sockets count?
discuss in: https://www.redhat.com/archives/libvir-list/2012-March/msg01123.html
https://www.redhat.com/archives/libvir-list/2012-March/msg01133.html describes why sockets per NUMA node is not really what we want.
Thanks for the clarification, I missed that thread. Regards, - Chen
participants (2)
-
Chen Hanxiao
-
Peter Krempa