[libvirt] Paradox cpu topology in capabilities outputs

Qiao, Liyong liyong.qiao at intel.com
Wed Jan 11 06:52:45 UTC 2017


Hi,

I observe that virsh capabilities give wrong cpu topology on a multiple sockets host

taget at jfz1r04h13:~/libvirt$ lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                72
On-line CPU(s) list:   0-71
Thread(s) per core:    2
Core(s) per socket:    18
Socket(s):             2 <------------------------
NUMA node(s):          2
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 63
Model name:            Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz
Stepping:              2
CPU MHz:               1201.660
CPU max MHz:           3600.0000
CPU min MHz:           1200.0000
BogoMIPS:              4590.78
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              46080K
NUMA node0 CPU(s):     0-17,36-53
NUMA node1 CPU(s):     18-35,54-71

But output of virsh capabilities only gives.

<topology sockets='1' cores='18' threads='2'/>

looking into code and got this:
https://libvirt.org/git/?p=libvirt.git;a=blob;f=src/util/virhostcpu.c;h=f29f3122acee018b9fd7dca06fd7ae1fc118b210;hb=HEAD#l703

should we change it into

704<https://libvirt.org/git/?p=libvirt.git;a=blob;f=src/util/virhostcpu.c;h=f29f3122acee018b9fd7dca06fd7ae1fc118b210;hb=HEAD#l704>             *sockets  += nodesockets;


This also affect nodeinfo.sockets.

Attached file is the full output of capabilities of the host

Best Regards

Eli Qiao(乔立勇)OpenStack Core team OTC Intel.
--

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170111/a41de12c/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cap_2_sockets
Type: application/octet-stream
Size: 7428 bytes
Desc: cap_2_sockets
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170111/a41de12c/attachment-0001.obj>


More information about the libvir-list mailing list