[Bionic] Update ThunderX2 implementation defined pmu core events

Bug #1796904 reported by Manoj Iyer on 2018-10-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
High
Canonical Kernel Team
Bionic
High
Unassigned

Bug Description

[IMPACT]
=======
The ARM architecture defines several events as part of the Performance Monitor Unit (PMU) Extension. In addition, Cavium has added "implementation defined" pmu core events, which Cavium deems most useful for analyzing performance. Currently perf does not list these "implementation defined" events.

[FIX]
====
b9b77222d4ff perf vendor events arm64: Update ThunderX2 implementation defined pmu core events

[TEST]
====
With the patch applied perf lists the additional PMU events.

ubuntu@starbuck:~$ perf list

List of pre-defined events (to be used in -e):

  armv8_pmuv3_0/br_immed_retired/ [Kernel PMU event]
  armv8_pmuv3_0/br_mis_pred/ [Kernel PMU event]
  armv8_pmuv3_0/br_mis_pred_retired/ [Kernel PMU event]
  armv8_pmuv3_0/br_pred/ [Kernel PMU event]
  armv8_pmuv3_0/br_retired/ [Kernel PMU event]
  armv8_pmuv3_0/br_return_retired/ [Kernel PMU event]
  armv8_pmuv3_0/bus_access/ [Kernel PMU event]
  armv8_pmuv3_0/bus_cycles/ [Kernel PMU event]
  armv8_pmuv3_0/cid_write_retired/ [Kernel PMU event]
  armv8_pmuv3_0/cpu_cycles/ [Kernel PMU event]
  armv8_pmuv3_0/exc_return/ [Kernel PMU event]
  armv8_pmuv3_0/exc_taken/ [Kernel PMU event]
  armv8_pmuv3_0/inst_retired/ [Kernel PMU event]
  armv8_pmuv3_0/inst_spec/ [Kernel PMU event]
  armv8_pmuv3_0/l1d_cache/ [Kernel PMU event]
  armv8_pmuv3_0/l1d_cache_allocate/ [Kernel PMU event]
  armv8_pmuv3_0/l1d_cache_refill/ [Kernel PMU event]
  armv8_pmuv3_0/l1d_cache_wb/ [Kernel PMU event]
  armv8_pmuv3_0/l1d_tlb/ [Kernel PMU event]
  armv8_pmuv3_0/l1d_tlb_refill/ [Kernel PMU event]
  armv8_pmuv3_0/l1i_cache/ [Kernel PMU event]
  armv8_pmuv3_0/l1i_cache_refill/ [Kernel PMU event]
  armv8_pmuv3_0/l1i_tlb/ [Kernel PMU event]
  armv8_pmuv3_0/l1i_tlb_refill/ [Kernel PMU event]
  armv8_pmuv3_0/l2d_cache/ [Kernel PMU event]
  armv8_pmuv3_0/l2d_cache_allocate/ [Kernel PMU event]
  armv8_pmuv3_0/l2d_cache_refill/ [Kernel PMU event]
  armv8_pmuv3_0/l2d_cache_wb/ [Kernel PMU event]
  armv8_pmuv3_0/l2d_tlb/ [Kernel PMU event]
  armv8_pmuv3_0/l2d_tlb_refill/ [Kernel PMU event]
  armv8_pmuv3_0/ld_retired/ [Kernel PMU event]
  armv8_pmuv3_0/mem_access/ [Kernel PMU event]
  armv8_pmuv3_0/st_retired/ [Kernel PMU event]
  armv8_pmuv3_0/stall_backend/ [Kernel PMU event]
  armv8_pmuv3_0/stall_frontend/ [Kernel PMU event]
  armv8_pmuv3_0/sw_incr/ [Kernel PMU event]
  armv8_pmuv3_0/ttbr_write_retired/ [Kernel PMU event]
  armv8_pmuv3_0/unaligned_ldst_retired/ [Kernel PMU event]

core imp def:
  bus_access_rd
       [Bus access read]
  bus_access_wr
       [Bus access write]
  exc_dabort
       [Exception taken, Data Abort and SError]
  exc_fiq
       [Exception taken, FIQ]
  exc_hvc
       [Exception taken, Hypervisor Call]
  exc_irq
       [Exception taken, IRQ]
  exc_pabort
       [Exception taken, Instruction Abort]
  exc_smc
       [Exception taken, Secure Monitor Call]
  exc_svc
       [Exception taken, Supervisor Call]
  exc_trap_dabort
       [Exception taken, Data Abort or SError not taken locally]
  exc_trap_fiq
       [Exception taken, FIQ not taken locally]
  exc_trap_irq
       [Exception taken, IRQ not taken locally]
  exc_trap_other
       [Exception taken, Other traps not taken locally]
  exc_trap_pabort
       [Exception taken, Instruction Abort not taken locally]
  exc_undef
       [Exception taken, Other synchronous]
  l1d_cache_inval
       [L1D cache invalidate]
  l1d_cache_rd
       [L1D cache access, read]
  l1d_cache_refill_inner
       [L1D cache refill, inner]
  l1d_cache_refill_outer
       [L1D cache refill, outer]
  l1d_cache_refill_rd
       [L1D cache refill, read]
  l1d_cache_refill_wr
       [L1D cache refill, write]
  l1d_cache_wb_clean
       [L1D cache Write-Back, cleaning and coherency]
  l1d_cache_wb_victim
       [L1D cache Write-Back, victim]
  l1d_cache_wr
       [L1D cache access, write]
  l1d_tlb_rd
       [L1D tlb access, read]
  l1d_tlb_refill_rd
       [L1D tlb refill, read]
  l1d_tlb_refill_wr
       [L1D tlb refill, write]
  l1d_tlb_wr
       [L1D tlb access, write]
  l2d_tlb_rd
       [L2D cache access, read]
  l2d_tlb_refill_rd
       [L2D cache refill, read]
  l2d_tlb_refill_wr
       [L2D cache refill, write]
  l2d_tlb_wr
       [L2D cache access, write]
  mem_access_rd
       [Data memory access, read]
  mem_access_wr
       [Data memory access, write]
  unaligned_ld_spec
       [Unaligned access, read]
  unaligned_ldst_spec
       [Unaligned access]
  unaligned_st_spec
       [Unaligned access, write]

  rNNN [Raw hardware event descrip
  cpu/t1=v1[,t2=v2,t3 ...]/modifier [Raw hardware event descrip
   (see 'man perf-list' on how to encode it)

  mem:<addr>[/len][:access] [Hardware breakpoint]

ubuntu@starbuck:~$

[REGRESSION POTENTIAL]
======================
The patch is limited to ARM64, ThunderX2 PMU core definitions json file. No regression potential for any kernel subsystems.

Manoj Iyer (manjo) on 2018-10-09
description: updated

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1796904

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: bionic
Manoj Iyer (manjo) wrote :

ubuntu@starbuck:~$ sudo perf stat -e l1d_cache_refill_rd,l1d_cache_refill_wr,armv8_pmuv3_0/l1d_cache_refill/ stress-ng -c 2 -i 1 -m 1 --vm-bytes 128M -t 10s
stress-ng: info: [4198] dispatching hogs: 2 cpu, 1 io, 1 vm
stress-ng: info: [4198] successful run completed in 10.01s

 Performance counter stats for 'stress-ng -c 2 -i 1 -m 1 --vm-bytes 128M -t 10s':

         601315558 l1d_cache_refill_rd
         262736817 l1d_cache_refill_wr
         864052375 armv8_pmuv3_0/l1d_cache_refill/

      10.083225659 seconds time elapsed

ubuntu@starbuck:~$

Manoj Iyer (manjo) wrote :

ubuntu@starbuck:~$ sudo perf stat -e unaligned_ld_spec,unaligned_st_spec,unaligned_ldst_spec,mem_access_rd,mem_access_wr,armv8_pmuv3_0/mem_access/ stress-ng -c 2 -i 1 -m 1 --vm-bytes 128M -t 10s
stress-ng: info: [4212] dispatching hogs: 2 cpu, 1 io, 1 vm
stress-ng: info: [4212] successful run completed in 10.02s

 Performance counter stats for 'stress-ng -c 2 -i 1 -m 1 --vm-bytes 128M -t 10s':

           3846782 unaligned_ld_spec
           6641633 unaligned_st_spec
          10488415 unaligned_ldst_spec
       10332730839 mem_access_rd
        8017909227 mem_access_wr
       18350639845 armv8_pmuv3_0/mem_access/

      10.083796005 seconds time elapsed

ubuntu@starbuck:~$

Manoj Iyer (manjo) wrote :

A test kernel and tool packages are available in ppa:yarmouth-team/lp1794838

Changed in linux (Ubuntu Bionic):
status: New → Triaged
Changed in linux (Ubuntu):
status: Incomplete → Triaged
Changed in linux (Ubuntu Bionic):
importance: Undecided → High
Changed in linux (Ubuntu Bionic):
status: Triaged → Fix Committed
Brad Figg (brad-figg) 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-bionic' to 'verification-done-bionic'. If the problem still exists, change the tag 'verification-needed-bionic' to 'verification-failed-bionic'.

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-bionic
Manoj Iyer (manjo) wrote :
Download full text (8.7 KiB)

-- -proposed kernel testing --

ubuntu@helo:~$ uname -a
Linux helo 4.15.0-39-generic #42-Ubuntu SMP Tue Oct 23 15:43:48 UTC 2018 aarch64 aarch64 aarch64 GNU/Linux
ubuntu@helo:~$

ubuntu@helo:~$ apt policy linux-image-generic
linux-image-generic:
  Installed: 4.15.0.39.41
  Candidate: 4.15.0.39.41
  Version table:
 *** 4.15.0.39.41 500
        500 http://ports.ubuntu.com/ubuntu-ports bionic-proposed/main arm64 Packages
        100 /var/lib/dpkg/status
     4.15.0.38.40 500
        500 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main arm64 Packages
     4.15.0.36.38 500
        500 http://ports.ubuntu.com/ubuntu-ports bionic-security/main arm64 Packages
     4.15.0.20.23 500
        500 http://ports.ubuntu.com/ubuntu-ports bionic/main arm64 Packages
ubuntu@helo:~$

ubuntu@helo:~$ perf list

List of pre-defined events (to be used in -e):

  armv8_pmuv3_0/br_immed_retired/ [Kernel PMU event]
  armv8_pmuv3_0/br_mis_pred/ [Kernel PMU event]
  armv8_pmuv3_0/br_mis_pred_retired/ [Kernel PMU event]
  armv8_pmuv3_0/br_pred/ [Kernel PMU event]
  armv8_pmuv3_0/br_retired/ [Kernel PMU event]
  armv8_pmuv3_0/br_return_retired/ [Kernel PMU event]
  armv8_pmuv3_0/bus_access/ [Kernel PMU event]
  armv8_pmuv3_0/bus_cycles/ [Kernel PMU event]
  armv8_pmuv3_0/cid_write_retired/ [Kernel PMU event]
  armv8_pmuv3_0/cpu_cycles/ [Kernel PMU event]
  armv8_pmuv3_0/exc_return/ [Kernel PMU event]
  armv8_pmuv3_0/exc_taken/ [Kernel PMU event]
  armv8_pmuv3_0/inst_retired/ [Kernel PMU event]
  armv8_pmuv3_0/inst_spec/ [Kernel PMU event]
  armv8_pmuv3_0/l1d_cache/ [Kernel PMU event]
  armv8_pmuv3_0/l1d_cache_allocate/ [Kernel PMU event]
  armv8_pmuv3_0/l1d_cache_refill/ [Kernel PMU event]
  armv8_pmuv3_0/l1d_cache_wb/ [Kernel PMU event]
  armv8_pmuv3_0/l1d_tlb/ [Kernel PMU event]
  armv8_pmuv3_0/l1d_tlb_refill/ [Kernel PMU event]
  armv8_pmuv3_0/l1i_cache/ [Kernel PMU event]
  armv8_pmuv3_0/l1i_cache_refill/ [Kernel PMU event]
  armv8_pmuv3_0/l1i_tlb/ [Kernel PMU event]
  armv8_pmuv3_0/l1i_tlb_refill/ [Kernel PMU event]
  armv8_pmuv3_0/l2d_cache/ [Kernel PMU event]
  armv8_pmuv3_0/l2d_cache_allocate/ [Kernel PMU event]
  armv8_pmuv3_0/l2d_cache_refill/ [Kernel PMU event]
  armv8_pmuv3_0/l2d_cache_wb/ [Kernel PMU event]
  armv8_pmuv3_0/l2d_tlb/ [Kernel PMU event]
  armv8_pmuv3_0/l2d_tlb_refill/ [Kernel PMU event]
  armv8_pmuv3_0/ld_retired/ [Kernel PMU event]
  armv8_pmuv3_0/mem_access/ [Kernel PMU event]
  armv8_pmuv3_0/st_retired/ ...

Read more...

tags: added: verification-done-bionic
removed: verification-needed-bionic
Launchpad Janitor (janitor) wrote :
Download full text (5.4 KiB)

This bug was fixed in the package linux - 4.15.0-39.42

---------------
linux (4.15.0-39.42) bionic; urgency=medium

  * linux: 4.15.0-39.42 -proposed tracker (LP: #1799411)

  * Linux: insufficient shootdown for paging-structure caches (LP: #1798897)
    - mm: move tlb_table_flush to tlb_flush_mmu_free
    - mm/tlb: Remove tlb_remove_table() non-concurrent condition
    - mm/tlb, x86/mm: Support invalidating TLB caches for RCU_TABLE_FREE
    - [Config] CONFIG_HAVE_RCU_TABLE_INVALIDATE=y

  * Ubuntu18.04: GPU total memory is reduced (LP: #1792102)
    - Revert "powerpc/powernv: Increase memory block size to 1GB on radix"

  * arm64: snapdragon: reduce boot noise (LP: #1797154)
    - [Config] arm64: snapdragon: DRM_MSM=m
    - [Config] arm64: snapdragon: SND*=m
    - [Config] arm64: snapdragon: disable ARM_SDE_INTERFACE
    - [Config] arm64: snapdragon: disable DRM_I2C_ADV7511_CEC
    - [Config] arm64: snapdragon: disable VIDEO_ADV7511, VIDEO_COBALT

  * [Bionic] CPPC bug fixes (LP: #1796949)
    - ACPI / CPPC: Update all pr_(debug/err) messages to log the susbspace id
    - cpufreq: CPPC: Don't set transition_latency
    - ACPI / CPPC: Fix invalid PCC channel status errors

  * regression in 'ip --family bridge neigh' since linux v4.12 (LP: #1796748)
    - rtnetlink: fix rtnl_fdb_dump() for ndmsg header

  * screen displays abnormally on the lenovo M715 with the AMD GPU (Radeon Vega
    8 Mobile, rev ca, 1002:15dd) (LP: #1796786)
    - drm/amd/display: Fix takover from VGA mode
    - drm/amd/display: early return if not in vga mode in disable_vga
    - drm/amd/display: Refine disable VGA

  * arm64: snapdragon: WARNING: CPU: 0 PID: 1 arch/arm64/kernel/setup.c:271
    reserve_memblock_reserved_regions (LP: #1797139)
    - SAUCE: arm64: Fix /proc/iomem for reserved but not memory regions

  * The front MIC can't work on the Lenovo M715 (LP: #1797292)
    - ALSA: hda/realtek - Fix the problem of the front MIC on the Lenovo M715

  * Keyboard backlight sysfs sometimes is missing on Dell laptops (LP: #1797304)
    - platform/x86: dell-smbios: Correct some style warnings
    - platform/x86: dell-smbios: Rename dell-smbios source to dell-smbios-base
    - platform/x86: dell-smbios: Link all dell-smbios-* modules together
    - [Config] CONFIG_DELL_SMBIOS_SMM=y, CONFIG_DELL_SMBIOS_WMI=y

  * rpi3b+: ethernet not working (LP: #1797406)
    - lan78xx: Don't reset the interface on open

  * 87cdf3148b11 was never backported to 4.15 (LP: #1795653)
    - xfrm: Verify MAC header exists before overwriting eth_hdr(skb)->h_proto

  * [Ubuntu18.04][Power9][DD2.2]package installation segfaults inside debian
    chroot env in P9 KVM guest with HTM enabled (kvm) (LP: #1792501)
    - KVM: PPC: Book3S HV: Fix guest r11 corruption with POWER9 TM workarounds

  * Provide mode where all vCPUs on a core must be the same VM (LP: #1792957)
    - KVM: PPC: Book3S HV: Provide mode where all vCPUs on a core must be the same
      VM

  * fscache: bad refcounting in fscache_op_complete leads to OOPS (LP: #1797314)
    - SAUCE: fscache: Fix race in decrementing refcount of op->npages

  * CVE-2018-9363
    - Bluetooth: hidp: buffer overflow in hidp_process_report

  * CVE-20...

Read more...

Changed in linux (Ubuntu Bionic):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers