Bug 1450724

Summary: [Pegas 1.0] qemu package scripts should not disable host multi-threading for POWER9
Product: Red Hat Enterprise Linux 7 Reporter: David Gibson <dgibson>
Component: qemu-kvmAssignee: David Gibson <dgibson>
Status: CLOSED ERRATA QA Contact: Qunfang Zhang <qzhang>
Severity: high Docs Contact:
Priority: high    
Version: 7.4-AltCC: bugproxy, dgibson, dzheng, gsun, hannsj_uhl, jomiller, mdeng, michen, mrezanin, qzhang, rbalakri, virt-maint, xianwang, xuma, yhong, yilzhang, zhengtli
Target Milestone: rcKeywords: Patch
Target Release: 7.4-Alt   
Hardware: ppc64le   
OS: Linux   
Whiteboard:
Fixed In Version: qemu-kvm-rhev-2.9.0-5.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-09 11:28:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1440030    

Description David Gibson 2017-05-15 03:32:34 UTC
Description of problem:

Due to limitations in the POWER8 thread/virtualization model, it was necessary to run a host in SMT disabled mode to run KVM guests.  Because of this the qemu-kvm-rhev package includes a script which disables SMT at boot.

However, on POWER9 these hardware limitations are eased (at least in radix MMU mode) so we don't need to disable SMT in the host.  Therefore our script should not disable SMT on POWER9.


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

qemu-kvm-rhev-2.9.0-3.el7.ppc64le

How reproducible:

100%

Steps to Reproduce:
1. Install the qemu-kvm-rhev package on a POWER9 radix-mode Pegas host.
2. Look at "ppc64_cpu --smt" and/or lscpu output

Actual results:

c155f1-u34:~$ ppc64_cpu  --smt
SMT is off

c155f1-u34:~$ lscpu
Architecture:          ppc64le
Byte Order:            Little Endian
CPU(s):                16
On-line CPU(s) list:   4,8,12,20
Off-line CPU(s) list:  5-7,9-11,13-15,21-23
Thread(s) per core:    1
Core(s) per socket:    2
Socket(s):             2
NUMA node(s):          2
Model:                 1.0 (pvr 004e 0100)
Model name:            POWER9 (raw), altivec supported
L1d cache:             32K
L1i cache:             32K
L2 cache:              512K
L3 cache:              10240K
NUMA node0 CPU(s):     4,8,12
NUMA node8 CPU(s):     20


Expected results:

SMT is on, no offline threads in host.

Additional info:

Comment 2 David Gibson 2017-05-15 04:02:29 UTC
I've made a draft fix and brewed it at:

https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=13196956

Comment 3 David Gibson 2017-05-15 04:48:11 UTC
Typo in my first attempt.  New fixed build at:

https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=13197012

Comment 4 David Gibson 2017-05-15 05:02:14 UTC
Note to QE,

In order to verify this bug we need to confirm that the updated package *does* disable SMT on POWER8 but *does not* disable SMT on POWER9.

Comment 5 IBM Bug Proxy 2017-05-15 20:40:39 UTC
------- Comment From clsoto.com 2017-05-15 16:31 EDT-------
*** Bug 154566 has been marked as a duplicate of this bug. ***

Comment 6 Miroslav Rezanina 2017-05-16 13:04:18 UTC
Fix included in qemu-kvm-rhev-2.9.0-5.el7

Comment 8 IBM Bug Proxy 2017-05-16 13:20:23 UTC
------- Comment From lagarcia.com 2017-05-16 09:10 EDT-------
David,

Would you be able to make this new qemu package available in your people's page?

------- Comment From lagarcia.com 2017-05-16 09:11 EDT-------
(In reply to comment #7)
> David,
>
> Would you be able to make this new qemu package available in your people's
> page?

Or should we leverage Sam and Suraj for that?

Comment 9 David Gibson 2017-05-17 03:54:19 UTC
I built updated preliminary packages including this change as well as the other outstanding bugfixes.  I've put them on people.redhat.com as well as on 10.0.0.7 in Poughkeepsie.

Comment 10 IBM Bug Proxy 2017-05-17 19:00:18 UTC
------- Comment From clsoto.com 2017-05-17 14:57 EDT-------
(In reply to comment #11)
> (In reply to comment #10)
> > (In reply to comment #9)
> > > I built updated preliminary packages including this change as well as the
> > > other outstanding bugfixes.  I've put them on people.redhat.com as well as
> > > on 10.0.0.7 in Poughkeepsie.
> > .
> > ... which is referencing the web site at
> > http://people.redhat.com/~dgibson/.bz1368786/
> > which now contains e.g.
> > "qemu-kvm-rhev-2.9.0-5.el7.dwg201705171225.ppc64le.rpm"
> > as of 05/17/2017 ...
> .
> ... please verify as soon as possible whether this qemu-kvm update
> will resolve this bugzilla ...

Installed this qemu
rpm -qa | grep qemu
qemu-kvm-rhev-2.9.0-5.el7.dwg201705171225.ppc64le
qemu-kvm-common-rhev-2.9.0-5.el7.dwg201705171225.ppc64le
qemu-kvm-tools-rhev-2.9.0-5.el7.dwg201705171225.ppc64le
qemu-img-rhev-2.9.0-5.el7.dwg201705171225.ppc64le
qemu-kvm-rhev-debuginfo-2.9.0-5.el7.dwg201705171225.ppc64le

I can see that we are not doing smt off in P9. thanks.

Comment 12 Qunfang Zhang 2017-07-17 08:02:13 UTC
Reproduced on qemu-kvm-rhev-2.9.0-4.el7:

(1) On Power9 host, enable smt:
# ppc64_cpu --smt
SMT=4
(2) Install qemu-kvm-rhev-2.9.0-4.el7
(3) After installation:
# ppc64_cpu --smt
SMT is off

SMT is disabled.

Verified pass on qemu-kvm-2.9.0-17.el7a.ppc64le for both Power8 and Power9 hosts:

Power9:

(1) Enable smt: 
# ppc64_cpu --smt
SMT=4
(2) Install qemu-kvm-2.9.0-17.el7a.ppc64le package.
(3) After installation:
# ppc64_cpu --smt
SMT=4

Power8:

(1) Enable smt: (ppc64_cpu --smt=on)
# ppc64_cpu --smt
SMT=8
(2) Install qemu-kvm-2.9.0-17.el7a.ppc64le package.
(3) After installation:
# ppc64_cpu --smt
SMT is off

Based on above, this bug is VERIFIED pass.

Comment 14 errata-xmlrpc 2017-11-09 11:28:46 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:3169