Ubuntu 16.04.03: perf tool does not count pm_run_inst_cmpl with rcode on POWER9 DD2.0

Bug #1709964 reported by bugproxy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
The Ubuntu-power-systems project
Fix Released
High
Canonical Kernel Team
linux (Ubuntu)
Fix Released
High
Joseph Salisbury
Zesty
Fix Released
High
Joseph Salisbury

Bug Description

== SRU Justification ==
Ubuntu 16.04.03: perf tool does not count pm_run_inst_cmpl with rcode on POWER9 DD2.0.

This is a regression introduced by mainline commit 8d911904f3ce. This regression
is resolved by commit 8c218578fcbbbdb10416c8614658bf32e3bf1655.

Commit 8c218578fc is available in mailine as of 4.12-rc5.

---Problem Description---
Unable to count pm_run_inst_cmpl using perf tool on boston dd2.0

root@isvbos3:~# perf stat -e r500fa,r600f4 -a sleep 1

 Performance counter stats for 'system wide':

   <not supported> r500fa
         8,162,912 r600f4

       1.001562716 seconds time elapsed

---uname output---
Linux isvbos3 4.10.0-29-generic #33~16.04.1-Ubuntu SMP Tue Jul 25 18:17:06 UTC 2017 ppc64le ppc64le ppc64le GNU/Linux

Machine Type = p9 dd2.0

---Steps to Reproduce---
 root@isvbos3:~# perf stat -e r500fa,r600f4 -a sleep 1

 Performance counter stats for 'system wide':

   <not supported> r500fa
         8,162,912 r600f4

       1.001562716 seconds time elapsed

> Also we need this upstream fix 8c218578fcbbbdb10416c8614658bf32e3bf1655 in
> the distro.

$ git log 8c218578fcbbbdb10416c8614658 -1
commit 8c218578fcbbbdb10416c8614658bf32e3bf1655
Author: Madhavan Srinivasan <email address hidden>
Date: Fri May 26 13:38:27 2017 +0530

    powerpc/perf: Fix Power9 test_adder fields

    Commit 8d911904f3ce4 ('powerpc/perf: Add restrictions to PMC5 in power9 DD1')
    was added to restrict the use of PMC5 in Power9 DD1. Intention was to disable
    the use of PMC5 using raw event code. But instead of updating the
    power9_isa207_pmu structure (used on DD1), the commit incorrectly updated the
    power9_pmu structure. Fix it.

    Fixes: 8d911904f3ce ("powerpc/perf: Add restrictions to PMC5 in power9 DD1")
    Reported-by: Shriya <email address hidden>
    Signed-off-by: Madhavan Srinivasan <email address hidden>
    Tested-by: Shriya <email address hidden>
    Signed-off-by: Michael Ellerman <email address hidden>

$ git describe --contains 8c218578fcbbbdb
v4.12-rc7~9^2~13
$

Commit 8c218578fc is available with kernel 4.12-rc7 afterwards.

I don't see this fix in the Ubuntu 16.04.3 Zesty tree (the P9 hwe kernel, 4.10 based).

Need to mirror to Canonical to request they pull in:
8c218578fcbbbdb10416c8614658bf32e3bf1655

CVE References

bugproxy (bugproxy)
tags: added: architecture-ppc64le bugnameltc-157381 severity-high targetmilestone-inin16043
Changed in ubuntu:
assignee: nobody → Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage)
affects: ubuntu → linux (Ubuntu)
Changed in ubuntu-power-systems:
importance: Undecided → High
assignee: nobody → Canonical Kernel Team (canonical-kernel-team)
Changed in linux (Ubuntu Zesty):
status: New → In Progress
Changed in linux (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
Changed in linux (Ubuntu Zesty):
importance: Undecided → Medium
assignee: nobody → Joseph Salisbury (jsalisbury)
Changed in linux (Ubuntu):
assignee: Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage) → Joseph Salisbury (jsalisbury)
importance: Medium → High
Changed in linux (Ubuntu Zesty):
importance: Medium → High
Frank Heimes (fheimes)
Changed in ubuntu-power-systems:
status: New → In Progress
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I built a 17.04(Zesty) test kernel with a pick of commit 8c218578fcbbbdb104. This kernel can be downloaded from:

http://kernel.ubuntu.com/~jsalisbury/lp1709964

Can you test this kernel and see if it resolves this bug?

Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2017-08-17 15:11 EDT-------
I believe Puvi verified the PMC5 issue is fixed with this build, although it hit a stability issue which is being addressed in bug 157728 (Canonical Launchpad bug 1711104 ).

Puvi, is that correct? If so I will mark this one verified..

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2017-08-24 12:31 EDT-------
(In reply to comment #18)
> I built a 17.04(Zesty) test kernel with a pick of commit 8c218578fcbbbdb104.
> This kernel can be downloaded from:
>
> http://kernel.ubuntu.com/~jsalisbury/lp1709964
>
> Can you test this kernel and see if it resolves this bug?

Puvi confirmed in a meeting that this test kernel fixed the PMC5 issue. Thanks!

description: updated
Changed in linux (Ubuntu Zesty):
status: In Progress → Fix Committed
Manoj Iyer (manjo)
Changed in linux (Ubuntu):
status: In Progress → Fix Committed
Changed in ubuntu-power-systems:
status: In Progress → Fix Committed
Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-zesty' to 'verification-done-zesty'. If the problem still exists, change the tag 'verification-needed-zesty' to 'verification-failed-zesty'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-zesty
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2017-09-06 15:53 EDT-------
Thanks, this problem is now resolved with the -proposed kernel.

linux-image-generic-hwe-16.04 4.10.0.34.36

perf stat -e r500fa,r600f4 -a sleep 1

Performance counter stats for 'system wide':

9,806,162 r500fa
14,606,347 r600f4

1.002951601 seconds time elapsed

tags: added: verification-done-zesty
removed: verification-needed-zesty
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (4.2 KiB)

This bug was fixed in the package linux - 4.10.0-35.39

---------------
linux (4.10.0-35.39) zesty; urgency=low

  * linux: 4.10.0-35.39 -proposed tracker (LP: #1716606)

  * kernel panic -not syncing: Fatal exception: panic_on_oops (LP: #1708399)
    - SAUCE: s390/mm: fix local TLB flushing vs. detach of an mm address space
    - SAUCE: s390/mm: fix race on mm->context.flush_mm

  * CVE-2017-1000251
    - Bluetooth: Properly check L2CAP config option output buffer length

linux (4.10.0-34.38) zesty; urgency=low

  * linux: 4.10.0-34.38 -proposed tracker (LP: #1713470)

  * Ubuntu 16.04.03: perf tool does not count pm_run_inst_cmpl with rcode on
    POWER9 DD2.0 (LP: #1709964)
    - powerpc/perf: Fix Power9 test_adder fields

  * HID: multitouch: Support ALPS PTP Stick and Touchpad devices (LP: #1712481)
    - HID: multitouch: Support PTP Stick and Touchpad device
    - SAUCE: HID: multitouch: Support ALPS PTP stick with pid 0x120A

  * igb: Support using Broadcom 54616 as PHY (LP: #1712024)
    - SAUCE: igb: add support for using Broadcom 54616 as PHY

  * RPT related fixes missing in Ubuntu 16.04.3 (LP: #1709220)
    - powerpc/mm/radix: Optimise tlbiel flush all case
    - powerpc/mm/radix: Improve _tlbiel_pid to be usable for PWC flushes
    - powerpc/mm/radix: Improve TLB/PWC flushes
    - powerpc/mm/radix: Avoid flushing the PWC on every flush_tlb_range

  * AMD RV platforms with SNPS 3.1 USB controller stop responding (S3 issue)
    (LP: #1711098)
    - usb: xhci: Issue stop EP command only when the EP state is running

  * dma-buf: performance issue when looking up the fence status (LP: #1711096)
    - dma-buf: avoid scheduling on fence status query v2

  * IPR driver causes multipath to fail paths/stuck IO on Medium Errors
    (LP: #1682644)
    - scsi: ipr: do not set DID_PASSTHROUGH on CHECK CONDITION

  * Disable CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE (LP: #1709171)
    - [Config] CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE=n for ppc64el

  * memory-hotplug test needs to be fixed (LP: #1710868)
    - selftests: typo correction for memory-hotplug test
    - selftests: check hot-pluggagble memory for memory-hotplug test
    - selftests: check percentage range for memory-hotplug test
    - selftests: add missing test name in memory-hotplug test
    - selftests: fix memory-hotplug test

  * Ubuntu 16.04.3: Qemu fails on P9 (LP: #1686019)
    - KVM: PPC: Pass kvm* to kvmppc_find_table()
    - KVM: PPC: Use preregistered memory API to access TCE list
    - KVM: PPC: VFIO: Add in-kernel acceleration for VFIO
    - powerpc/powernv/iommu: Add real mode version of iommu_table_ops::exchange()
    - powerpc/powernv/ioda2: Update iommu table base on ownership change
    - powerpc/iommu/vfio_spapr_tce: Cleanup iommu_table disposal
    - powerpc/vfio_spapr_tce: Add reference counting to iommu_table
    - powerpc/mmu: Add real mode support for IOMMU preregistered memory
    - KVM: PPC: Reserve KVM_CAP_SPAPR_TCE_VFIO capability number
    - KVM: PPC: Book3S HV: Add radix checks in real-mode hypercall handlers

  * [SRU][Zesty] [QDF2400] pl011 E44 erratum patch needed for 2.0 firmware and
    1.1 silicon (LP: #1709123)
    - tty: pl011: fix initialization or...

Read more...

Changed in linux (Ubuntu Zesty):
status: Fix Committed → Fix Released
Manoj Iyer (manjo)
Changed in ubuntu-power-systems:
status: Fix Committed → Fix Released
Po-Hsu Lin (cypressyew)
Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.