Bug 1222325 - Guests machine are not SMT capable
Summary: Guests machine are not SMT capable
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHEV for Power
Classification: Retired
Component: qemu-kvm-rhev
Version: 3.4
Hardware: ppc64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Virtualization Maintenance
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: RHEV4.0PPC RHV4.1PPC
TreeView+ depends on / blocked
 
Reported: 2015-05-17 16:28 UTC by Facundo Garat
Modified: 2016-07-25 14:18 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-05-11 05:30:21 UTC
Embargoed:


Attachments (Terms of Use)
rhev hook to enable SMT in guest (986 bytes, text/plain)
2016-01-28 17:44 UTC, Michal Skrivanek
no flags Details

Description Facundo Garat 2015-05-17 16:28:04 UTC
Description of problem:
I cannot enable SMT on guest. its shows "Machine is not SMT capable"
If I enable SMT on the host machines wont start (AFAIK SMT on the host has to be disabled)
This happends with or without the option "Count Threads as cores" on the RHEV-M cluster.

And its not possible to specify the number of threads per core on the VM configuration.

Version-Release number of selected component (if applicable):
RHEV for IBM POWER release 3.4.4 build 31 service (pkvm2_1_1)
RHEV-M 3.5

How reproducible:
Every time

Steps to Reproduce:
1. run: ppc64_cpu --smt
2. run: lscpu
3. run: ppc64_cpu --cores
4. run: ppc64_cpu --threads-per-core

Actual results:
[root@localhost ~]# lscpu
Architecture:          ppc64le
Byte Order:            Little Endian
CPU(s):                1
On-line CPU(s) list:   0
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s):             1
NUMA node(s):          1
Model:                 IBM pSeries (emulated by qemu)
L1d cache:             64K
L1i cache:             32K
NUMA node0 CPU(s):     0
[root@localhost ~]# ppc64_cpu --smt=on
Machine is not SMT capable
[root@localhost ~]# ppc64_cpu --threads-per-core
Threads per core: 1


Expected results:
[root@localhost ~]# ppc64_cpu --smt=on

[root@localhost ~]# lscpu
Architecture:          ppc64le
Byte Order:            Little Endian
CPU(s):                1
On-line CPU(s) list:   0
Thread(s) per core:    8
Core(s) per socket:    1
Socket(s):             1
NUMA node(s):          1
Model:                 IBM pSeries (emulated by qemu)
L1d cache:             64K
L1i cache:             32K
NUMA node0 CPU(s):     0

[root@localhost ~]# ppc64_cpu --threads-per-core
Threads per core: 8



Additional info:
[root@localhost ~]# cat /proc/cpuinfo
processor       : 0
cpu             : POWER8E (raw), altivec supported
clock           : 3425.000000MHz
revision        : 2.1 (pvr 004b 0201)

timebase        : 512000000
platform        : pSeries
model           : IBM pSeries (emulated by qemu)
machine         : CHRP IBM pSeries (emulated by qemu)

Comment 1 Facundo Garat 2015-05-17 16:31:44 UTC
Here is a reference of the configuration needed on the VM for this to work:

https://www.ibm.com/developerworks/community/forums/html/topic?id=27d8364f-c952-49fe-a989-fc328c1f7110

 that's the correct question/suggestion. for the entry above, the vcpu should be set to 16. I just checked on a RH 7.1 vm and the following in the domain works (ppc64_cpu --smt give SMT=8):

  <vcpu placement='static'>16</vcpu>

and

  <cpu mode='host-passthrough'>
    <topology sockets='1' cores='2' threads='8'/>
  </cpu>

Comment 2 Miya Chen 2015-05-20 11:03:30 UTC
Facundo, so can we close this bug as not a bug above your comment#1 now?

Comment 3 Facundo Garat 2015-05-20 13:00:17 UTC
I think is still a bug or a new feature for RHEV-M because i can't configure this on RHEV AFAIK.

Comment 4 James F 2015-10-02 10:43:31 UTC
Is there any update on this bug please? One of the major selling points of the Power8 platform is that it supports 8 threads per core (as opposed to Intel's 2 threads per core under HT). Without the ability for SMT to work as detailed here, we cannot make best use of the CPU capabilities of the platform. 

If I switch to IBM's PowerKVM then I can use virsh as detailed previously in this bug to reconfigure the VM manually. However it is not possible to use virsh under RHEV and I cannot immediately see how to edit the VM's vCPU specifications under vdsClient.

I am happy to back up Facundo's comment - this is a bug. On an Intel platform you can use the "count threads as cores" option for this purpose - however this option does not work on the Power8 platform.

Comment 5 Scott Herold 2016-01-28 16:39:46 UTC
Michal,

Is it possible that we may be able to use a custom hook to enable this functionality pending proper implementation into RHEV?

Comment 6 Michal Skrivanek 2016-01-28 17:38:07 UTC
Yes, we can use the hook. 
3.6.2(beta3) x86 RHEV has a proper fix
RHEV for POWER 3.6 as of now doesn't, but the hook was verified working.
RHEV for POWER on PowerKVM system - the hook likely works as well, was not tested

I'll attach it here

Comment 7 Michal Skrivanek 2016-01-28 17:44:35 UTC
Created attachment 1119226 [details]
rhev hook to enable SMT in guest

Comment 8 Michal Skrivanek 2016-01-28 17:50:16 UTC
on management node:
enable custom properties using engine-config, check that it's there

engine-config -g UserDefinedVMProperties |egrep thre
UserDefinedVMProperties: threads_per_core=^[0-9]+$ version: 3.4
UserDefinedVMProperties: threads_per_core=^[0-9]+$ version: 3.5

and restart ovirt-engine service. Then you can use VM's custom properties subtab to configure new property "threads_per_core" (there is no reasonable validation, obviously you should only use what's supported 2,4,8 I believe)

on host:
place the attached file to /usr/libexec/vdsm/hooks/before_vm_start/49_threads_per_core
use 755 permissions
service vdsmd restart

HTH

Comment 10 Michal Skrivanek 2016-05-11 05:30:21 UTC
Closing as fixed in rhev 3.6 ga, number of threads can be configured per vm


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