[22.04 FEAT] Add new CPU-MF Counters for new IBM Z Hardware - libpfm part

Bug #1960118 reported by bugproxy
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu on IBM z Systems
Fix Released
High
Skipper Bug Screeners
libpfm4 (Ubuntu)
Fix Released
High
Unassigned
Jammy
Fix Released
High
Unassigned
Kinetic
Fix Released
High
Unassigned

Bug Description

SRU Justification:
------------------

[Impact]

 * This is an hardware enablement SRU,
   that adds support for the new IBM zSystems hardware in libpfm4.

 * It's in particular to add new CPU-MF Counters
   for new the IBM z16 hardware.

 * Otherwise z16-specific CPU performance measurement facility
   counters cannot be used with libpfm4.

[Fix]

 * b03a81 b03a81ea006658b3aa478e22f4d0b7741cf7346f "s390: Update counter definition for IBM z16"

[Test Plan]

 * Since libpfm4 is a library, the best was to test it is with the
   help of a brief test program.

 * Install libpfm4-dev_4.11.1+git32-gd0b85fb-1ubuntu0.1_s390x.deb
   and libpfm4_4.11.1+git32-gd0b85fb-1ubuntu0.1_s390x.deb
   on an IBM z16 system (with hardware counters enabled).
   and navigate to /usr/share/doc/libpfm4-dev/examples/ to find the
   two example programs 'check_events' and 'showevtinfo'
   and build or compile them.

 * Alternatively do this based on the raw project sources:
   git clone git://perfmon2.git.sourceforge.net/gitroot/perfmon2/libpfm4
   cd libpfm4
   make

 * Now run the 'showevtinfo' program (in examples subdirectory)
   to get a list of all available events,
   masks and modifiers that are supported
   and look (grep) for z16 related events
   as they are listed in the commit above.

[Where problems could occur]

 * There is not much that can go wrong, other than:

 * syntactical errors (will be identified by a test compile)

 * making use of 'LIBPFM_ARRAY_SIZE(cpumcf_z16_counters)' for
   the wrong machine types (but 3931 and 3932 are z16)

 * or someone added/assigned the wrong set of counters for
   the z16 hardware and machine types.

 * A test package was build for all major architectures
   and is available via this PPA:
   https://launchpad.net/~fheimes/+archive/ubuntu/lp1960118

[Other Info]

 * Version libpfm4 4.11.1+git74-g5140ce5 in kinetic has the commit/patch
   already included, since it's a snapshot that was taken after b03a81
   was brought upstream.
__________

Add new CPU-MF Counters for new IBM Z Hardware - libpfm part

Description:
Add new CPU-MF Counters for new IBM Z Hardware.

Has a kernel, s390utils/s390-tools and libpfm part.

Request Type: Package - Update Version
Upstream Acceptance: In Progress

---
External link: https://warthogs.atlassian.net/browse/PEI-31

bugproxy (bugproxy)
tags: added: architecture-s39064 bugnameltc-196343 severity-high targetmilestone-inin2204
Changed in ubuntu:
assignee: nobody → Skipper Bug Screeners (skipper-screen-team)
affects: ubuntu → linux (Ubuntu)
Frank Heimes (fheimes)
affects: linux (Ubuntu) → libpfm4 (Ubuntu)
Changed in ubuntu-z-systems:
assignee: nobody → Skipper Bug Screeners (skipper-screen-team)
importance: Undecided → High
Changed in libpfm4 (Ubuntu):
importance: Undecided → High
status: New → Incomplete
Changed in ubuntu-z-systems:
status: New → Incomplete
Revision history for this message
Frank Heimes (fheimes) wrote :

libpfm 4.11.1+git32-gd0b85fb-1 is what we have in jammy as of today (and what's also incl. in Debian bookworm).
4.11 is also the latest upstream release, that is from Sept 2020.
So maybe some selected commits to cherry pick (or backports) might be needed to integrate this functionality ...

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

------- Comment From <email address hidden> 2022-02-20 17:04 EDT-------
The patches covering the new CPU-MF counters for the libpfm part cannot be provided before the documentation for the new IBM Z Hardware is available which is usually after the GA date.
Therefore, we cannot make the jammy feature freeze date and will have to apply these hardware enablement patches at a later point in time

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2022-08-26 11:15 EDT-------
Patch for z16 extended counter set accepted by Erianne Stephanne on 31-May-2022

commit b03a81ea006658b3aa478e22f4d0b7741cf7346f
Author: Thomas Richter <email address hidden>
Date: Tue May 31 05:47:23 2022 -0700

s390: Update counter definition for IBM z16

Revision history for this message
Frank Heimes (fheimes) wrote :

Updating the status for kinetic for Fix Released, since the patch is incl in:
libpfm4 | 4.11.1+git74-g5140ce5-1 | kinetic

Changed in libpfm4 (Ubuntu Kinetic):
status: Incomplete → Fix Released
assignee: Skipper Bug Screeners (skipper-screen-team) → nobody
Changed in libpfm4 (Ubuntu Jammy):
assignee: nobody → Skipper Bug Screeners (skipper-screen-team)
importance: Undecided → High
Changed in ubuntu-z-systems:
status: Incomplete → In Progress
Revision history for this message
Frank Heimes (fheimes) wrote :

A test build in PPA, done for all major architectures,
completed successfully and is available here:
https://launchpad.net/~fheimes/+archive/ubuntu/lp1960118

Please see attached the debdiff for jammy...

description: updated
Frank Heimes (fheimes)
Changed in libpfm4 (Ubuntu Jammy):
status: New → In Progress
information type: Private → Public
Frank Heimes (fheimes)
Changed in libpfm4 (Ubuntu Jammy):
assignee: Skipper Bug Screeners (skipper-screen-team) → nobody
Frank Heimes (fheimes)
description: updated
tags: added: pei-31
Revision history for this message
Simon Chopin (schopin) wrote :

Uploaded to Jammy, with a small change to the changelog to add the bug number.

Revision history for this message
Dan Bungert (dbungert) wrote :

Unsubscribing sponsors since Simon is looking at this already.

Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello bugproxy, or anyone else affected,

Accepted libpfm4 into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/libpfm4/4.11.1+git32-gd0b85fb-1ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in libpfm4 (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-jammy
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2022-11-21 08:48 EDT-------
I have install Ubuntu 22.04
and downloaded this git reposity:

HEAD is now at 515dd82 4.11.1+git32-gd0b85fb-1ubuntu0.1

I can verify that this source code package of libpfm4 has the z16 support
include.

Hope this helps.

------- Comment From <email address hidden> 2022-11-23 05:13 EDT-------
@Thomas: thanks for your successful verification.
Therefore, I am changing the keywords/tags to : verification-done

tags: added: verification-done verification-done-jammy
removed: verification-needed verification-needed-jammy
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libpfm4 - 4.11.1+git32-gd0b85fb-1ubuntu0.1

---------------
libpfm4 (4.11.1+git32-gd0b85fb-1ubuntu0.1) jammy; urgency=medium

  * Add d/p/lp-1960118-s390-Update-counter-definition-for-IBM-z16.patch
    to add new CPU-MF counters for new IBM zSystems hardware. (LP: #1960118)

 -- Frank Heimes <email address hidden> Mon, 29 Aug 2022 12:39:14 +0200

Changed in libpfm4 (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for libpfm4 has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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

------- Comment From <email address hidden> 2022-11-29 23:08 EDT-------
Fix landed in jammy, therefore we can close this bug.

Thanks everyone for your work.

==> Changing status to: CLOSED

Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: In Progress → 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.