Bug 1347458 - libvirt reports wrong cpu topology on 2 sockets cpu
Summary: libvirt reports wrong cpu topology on 2 sockets cpu
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-16 23:54 UTC by qiaoliyong
Modified: 2020-04-17 13:55 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-04-17 13:55:46 UTC
Embargoed:


Attachments (Terms of Use)

Description qiaoliyong 2016-06-16 23:54:49 UTC
Description of problem:
virsh capabilities reportes wrong cpu topology on intel CPU E5-2699

Version-Release number of selected component (if applicable):

1.3.6 (not released yet)

How reproducible:

virsh capabilities
 

Steps to Reproduce:
1.virsh capabilities


Actual results:
...
            <cpu id='17' socket_id='0' core_id='8' siblings='17'/>
            <cpu id='18' socket_id='0' core_id='9' siblings='18'/>
            <cpu id='19' socket_id='0' core_id='9' siblings='19'/>
            <cpu id='20' socket_id='0' core_id='10' siblings='20'/>
            <cpu id='21' socket_id='0' core_id='10' siblings='21'/>
            <cpu id='22' socket_id='0' core_id='11' siblings='22'/>
            <cpu id='23' socket_id='0' core_id='11' siblings='23'/>
            <cpu id='24' socket_id='0' core_id='12' siblings='24'/>
            <cpu id='25' socket_id='0' core_id='12' siblings='25'/>
            <cpu id='26' socket_id='0' core_id='13' siblings='26'/>
            <cpu id='27' socket_id='0' core_id='13' siblings='27'/>
            <cpu id='28' socket_id='0' core_id='14' siblings='28'/>
            <cpu id='29' socket_id='0' core_id='14' siblings='29'/>
            <cpu id='30' socket_id='0' core_id='15' siblings='30'/>
            <cpu id='31' socket_id='0' core_id='15' siblings='31'/>
            <cpu id='32' socket_id='0' core_id='16' siblings='32'/>
            <cpu id='33' socket_id='0' core_id='16' siblings='33'/>
            <cpu id='34' socket_id='0' core_id='17' siblings='34'/>
            <cpu id='35' socket_id='0' core_id='17' siblings='35'/>
            <cpu id='0'/>
            <cpu id='0'/>
            <cpu id='0'/>
            <cpu id='0'/>
            <cpu id='0'/>
            <cpu id='0'/>
            <cpu id='0'/>
            <cpu id='0'/>
            <cpu id='0'/>
            <cpu id='0'/>
            <cpu id='0'/>
            <cpu id='0'/>
            <cpu id='0'/>
            <cpu id='0'/>
 ...
Expected results:

should give correct socket_id.

Additional info:

Comment 1 qiaoliyong 2016-06-16 23:55:43 UTC
$ 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:               1559.687
CPU max MHz:           3600.0000
CPU min MHz:           1200.0000
BogoMIPS:              4590.65
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
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm xsaveopt cqm_llc cqm_occup_llc dtherm ida arat pln pts

Comment 2 mabrothier 2017-05-02 13:49:48 UTC
same problem with version 1.3.1


$ virsh nodeinfo
CPU model:           x86_64
CPU(s):              32
CPU frequency:       1200 MHz
CPU socket(s):       1
Core(s) per socket:  8
Thread(s) per core:  2
NUMA cell(s):        2
Memory size:         198052408 KiB


$ lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                32
On-line CPU(s) list:   0-31
Thread(s) per core:    2
Core(s) per socket:    8
Socket(s):             2
NUMA node(s):          2
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 62
Model name:            Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
Stepping:              4
CPU MHz:               1217.734
CPU max MHz:           3400.0000
CPU min MHz:           1200.0000
BogoMIPS:              5191.71
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              20480K
NUMA node0 CPU(s):     0-7,16-23
NUMA node1 CPU(s):     8-15,24-31
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts

Comment 3 Daniel Berrangé 2017-05-02 13:58:15 UTC
@mabrothier: The tools you are comparing are reporting different semantics.  The virsh nodeinfo output is reporting the the CPU sockets *per* NUMA node, while lscpu is reporting total CPU sockets across all nodes. So the data you post here *is* consistent and not related to the original bug report here.

Comment 4 Daniel Berrangé 2020-04-17 13:55:46 UTC
Closing old bug, since we have no access to any system that reproduces the issue.


Note You need to log in before you can comment on or make changes to this bug.