Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1355799 - Capabilities reporting wrong number of sockets
Summary: Capabilities reporting wrong number of sockets
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: ppc64le
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Andrea Bolognani
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-12 14:42 UTC by Rafael Folco
Modified: 2016-07-13 20:56 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-13 20:56:28 UTC


Attachments (Terms of Use)

Description Rafael Folco 2016-07-12 14:42:05 UTC
Description of problem:

Libvirt getCapabilities() reports wrong number of sockets for POWER8 machines.

# virsh capabilities |grep sockets
      <topology sockets='1' cores='5' threads='8'/>


# lscpu
Architecture:          ppc64le
Byte Order:            Little Endian
CPU(s):                160
On-line CPU(s) list:   0,8,16,24,32,40,48,56,64,72,80,88,96,104,112,120,128,136,144,152
Off-line CPU(s) list:  1-7,9-15,17-23,25-31,33-39,41-47,49-55,57-63,65-71,73-79,81-87,89-95,97-103,105-111,113-119,121-127,129-135,137-143,145-151,153-159
Thread(s) per core:    1
Core(s) per socket:    5
Socket(s):             4
NUMA node(s):          4
Model:                 2.1 (pvr 004b 0201)
Model name:            POWER8E (raw), altivec supported
CPU max MHz:           3690.0000
CPU min MHz:           2061.0000
L1d cache:             64K
L1i cache:             32K
L2 cache:              512K
L3 cache:              8192K
NUMA node0 CPU(s):     0,8,16,24,32
NUMA node1 CPU(s):     120,128,136,144,152
NUMA node16 CPU(s):    40,48,56,64,72
NUMA node17 CPU(s):    80,88,96,104,112





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

How reproducible:


Steps to Reproduce:
virsh capabilities |grep sockets
      <topology sockets='1' cores='5' threads='8'/>

Actual results:
virsh capabilities |grep sockets
      <topology sockets='1' cores='5' threads='8'/>

Expected results:
virsh capabilities |grep sockets
      <topology sockets='4' cores='5' threads='8'/>

Additional info:
platform	: PowerNV
model		: 8247-22L
machine		: PowerNV 8247-22L

Comment 1 Andrea Bolognani 2016-07-13 13:51:54 UTC
(In reply to Rafael Folco from comment #0)
> Description of problem:
> 
> Libvirt getCapabilities() reports wrong number of sockets for POWER8
> machines.
> 
> # virsh capabilities |grep sockets
>       <topology sockets='1' cores='5' threads='8'/>
> 
> 
> # lscpu
> Architecture:          ppc64le
> Byte Order:            Little Endian
> CPU(s):                160
> On-line CPU(s) list:  
> 0,8,16,24,32,40,48,56,64,72,80,88,96,104,112,120,128,136,144,152
> Off-line CPU(s) list: 
> 1-7,9-15,17-23,25-31,33-39,41-47,49-55,57-63,65-71,73-79,81-87,89-95,97-103,
> 105-111,113-119,121-127,129-135,137-143,145-151,153-159
> Thread(s) per core:    1
> Core(s) per socket:    5
> Socket(s):             4
> NUMA node(s):          4
> Model:                 2.1 (pvr 004b 0201)
> Model name:            POWER8E (raw), altivec supported
> CPU max MHz:           3690.0000
> CPU min MHz:           2061.0000
> L1d cache:             64K
> L1i cache:             32K
> L2 cache:              512K
> L3 cache:              8192K
> NUMA node0 CPU(s):     0,8,16,24,32
> NUMA node1 CPU(s):     120,128,136,144,152
> NUMA node16 CPU(s):    40,48,56,64,72
> NUMA node17 CPU(s):    80,88,96,104,112

libvirt is actually reporting the intended information.

The 'sockets' attribute of the <topology> element reports the
number of sockets *per node* rather then the total number of
sockets in the system: this is consistent with how the 'cores'
attribute reports the number of cores per socket and how the
'threads' attribute reports the number of threads per core.

If you want to know the total number of sockets in the system,
you can do so by multiplying the value of the 'sockets'
attribute with the value of the 'num' attribute of the <cells>
element.

Unfortunately NUMA support was added only relatively recently
to libvirt, when it was too late to change existing
interfaces; as a consequence, it's fairly common to have to
look at several different elements to get the full picture.

Comment 2 Rafael Folco 2016-07-13 20:56:28 UTC
Thanks for explaining, Andrea. Closing as NOT_A_BUG.


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