debcrafters-packages team mailing list archive
-
debcrafters-packages team
-
Mailing list archive
-
Message #04229
[Bug 2103414] Re: [25.04 FEAT] [post announcement] [KRN2304] CPU-MF Counters for new IBM Z hardware - s390-tools part
The s390-tools packages got meanwhile completely build:
$ rmadison --suite=plucky-proposed,noble-proposed s390-tools s390-tools-signed s390-tools-data
s390-tools | 2.31.0-0ubuntu5.2 | noble-proposed | source, amd64, arm64, ppc64el, s390x
s390-tools | 2.37.0-0ubuntu2.1 | plucky-proposed | source, amd64, arm64, ppc64el, s390x
s390-tools-signed | 2.31.0-0ubuntu5.2 | noble-proposed | source, all
s390-tools-signed | 2.37.0-0ubuntu2.1 | plucky-proposed | source, all
s390-tools-data | 2.31.0-0ubuntu5.2 | noble-proposed | all
s390-tools-data | 2.37.0-0ubuntu2.1 | plucky-proposed | all
I think easiest to get to the version from -proposed now is (example is
based on 25.04/plucky):
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 25.04
Release: 25.04
Codename: plucky
This is the currently installed version::
$ apt-cache policy s390-tools
s390-tools:
Installed: 2.37.0-0ubuntu2
Candidate: 2.37.0-0ubuntu2
Version table:
*** 2.37.0-0ubuntu2 500
500 http://ports.ubuntu.com/ubuntu-ports plucky/main s390x Packages
100 /var/lib/dpkg/status
Now add the -proposed archive pocket:
$ sudo add-apt-repository -y "deb http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -sc)-proposed main universe"
# this should update the package index automatically these days and should show -proposed lines like:
# Get:x http://ports.ubuntu.com/ubuntu-ports plucky-proposed/main s390x Components ... and more
[ One could now do a 'sudo apt modernize-sources', but that's optional
and not relevant here. ]
The new package version should now be listed here:
$ apt-cache policy s390-tools
s390-tools:
Installed: 2.37.0-0ubuntu2
Candidate: 2.37.0-0ubuntu2
Version table:
2.37.0-0ubuntu2.1 100 <=== !!
100 http://ports.ubuntu.com/ubuntu-ports plucky-proposed/main s390x Packages
*** 2.37.0-0ubuntu2 500
500 http://ports.ubuntu.com/ubuntu-ports plucky/main s390x Packages
100 /var/lib/dpkg/status
The package(s) can now be installed from -proposed either via explicitly specifying their version:
$ sudo apt install s390-tools=2.37.0-0ubuntu2.1 s390-tools-signed=2.37.0-0ubuntu2.1 s390-tools-data=2.37.0-0ubuntu2.1
or via pointing to the archive-pocket name, the packages should be taken from:
$ sudo apt -t=$(lsb_release -cs)-proposed install s390-tools s390-tools-signed s390-tools-data
And you may verify that the currently installed version is really
2.37.0-0ubuntu2.1:
apt-cache policy s390-tools s390-tools-signed s390-tools-data
s390-tools:
Installed: 2.37.0-0ubuntu2.1
Candidate: 2.37.0-0ubuntu2.1
Version table:
*** 2.37.0-0ubuntu2.1 100
100 http://ports.ubuntu.com/ubuntu-ports plucky-proposed/main s390x Packages
100 /var/lib/dpkg/status
2.37.0-0ubuntu2 500
500 http://ports.ubuntu.com/ubuntu-ports plucky/main s390x Packages
s390-tools-signed:
Installed: 2.37.0-0ubuntu2.1
Candidate: 2.37.0-0ubuntu2.1
Version table:
*** 2.37.0-0ubuntu2.1 100
100 http://ports.ubuntu.com/ubuntu-ports plucky-proposed/main s390x Packages
100 /var/lib/dpkg/status
2.37.0-0ubuntu2 500
500 http://ports.ubuntu.com/ubuntu-ports plucky/main s390x Packages
s390-tools-data:
Installed: 2.37.0-0ubuntu2.1
Candidate: 2.37.0-0ubuntu2.1
Version table:
*** 2.37.0-0ubuntu2.1 100
100 http://ports.ubuntu.com/ubuntu-ports plucky-proposed/main s390x Packages
100 /var/lib/dpkg/status
2.37.0-0ubuntu2 500
500 http://ports.ubuntu.com/ubuntu-ports plucky/main s390x Packages
Or more compact:
$ dpkg -l | grep s390-tools
ii s390-tools 2.37.0-0ubuntu2.1 s390x fundamental utilities for Linux on z Systems
ii s390-tools-data 2.37.0-0ubuntu2.1 all fundamental utilities for Linux on z Systems (data files)
ii s390-tools-signed 2.37.0-0ubuntu2.1 all Signed zipl stage3.bin
--
You received this bug notification because you are a member of
Debcrafters packages, which is subscribed to s390-tools in Ubuntu.
https://bugs.launchpad.net/bugs/2103414
Title:
[25.04 FEAT] [post announcement] [KRN2304] CPU-MF Counters for new IBM
Z hardware - s390-tools part
Status in Ubuntu on IBM z Systems:
In Progress
Status in s390-tools package in Ubuntu:
Fix Released
Status in s390-tools-signed package in Ubuntu:
Fix Released
Status in s390-tools source package in Noble:
Fix Committed
Status in s390-tools-signed source package in Noble:
Fix Committed
Status in s390-tools source package in Plucky:
Fix Committed
Status in s390-tools-signed source package in Plucky:
Fix Committed
Status in s390-tools source package in Questing:
Fix Released
Status in s390-tools-signed source package in Questing:
Fix Released
Bug description:
[ Impact ]
* A new IBM Z hardware generation (z17) was recently introduced.
* Hence s390-tools' libutil needs to be aware of the new hardware
name (z17, z17_2) and it's new type(s) (9175, 9176) to be able
to identify and map type to name and vice versa.
* This is especially needed to map new CPU management facility (MF)
hardware counters to the correct hardware name and type.
* Without patching, new z17 hw, i.e. if referenced in CPU MF
(or other cases) by it's new machine type, would be reported
by libutils as "Unknown machine type".
[ Test Plan ]
* Prepare an IBM z17 LPAR with Ubuntu 25.04
(incl. this s390-tools patch and the commit above for the kernel).
* At LPARs activation profile, navigate to the Security page
and within the counter facility options, select each counter set
you want to use. (One may just select all for testing purposes.)
* Use 'perf list' to determine if the new counters are listed.
(Cmd 'ls -l /sys/devices/cpum_cf/events | wc -l' needs to report 106 on z17.)
* For comparing the new counters (and their names) see:
dc7cafd91cba ("s390/cpumf: Update CPU Measurement facility extended
counter set support")
https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/\
plucky/commit/?h=master-next&id=dc7cafd91cba63b200f33ced7530b1d76a2b5495
* Use 'perf stat -e <counter>' to enable and make use of these
counters.
* In addition to the more end to end test above,
a proper machine identification can be done using
the lscpumf tool (that uses lbutils):
- libutils is a static library (.a) used by lscpumf.
If 'lscpumf -C' is used to list all counters that are provided
by the underlying IBM Z hardware generation, it will list the
identified hardware in the first row
(mapped from its type number, obtained from /proc/sysinfo
'Type:' field):
- $ lscpumf -C | head -1
perf event counter list for IBM z17
- The complete output of 'lscpumf -C' should then contain all
the new counters that are now available for the new hardware
generation (see above kernel commit dc7cafd91cba).
[ Fix ]
* b3db52fd165e6a26d9c73e51bd5322b55017ef94
("libutil: Add machine type definition for machines 9175 and 9176")
* Nobel misses the type for an intermediate/updated model
('Z16_A02' on top of Z16)
thus I'm adding this first (needed for noble only) as a pre-requirement.
ef1799f31fa2a11467373077058b8b5a3838c4b1
("s390-tools/libutil: Add machine type 3932")
[ Where problems could occur ]
* The patch is pretty straight forward, but there can always be problems,
be it a 'slip of the pen' or a typo, with that:
* The names or type information could be wrong, which could lead
to an incorrect identification (or not identification) of a z17 system.
* The new case statements might not be inserted correctly
or not correctly closed/terminated,
which might lead again to an incorrect identification
or to "Unknown machine type".
* The above could again lead to:
- incorrect event exposure on unsupported hardware
- invalid perf measurements
- sysfs inconsistencies
- or warnings due to misconfigured or non-existent counters
* Only new code is added by this commit - none is changed nor
removed.
* These CPU MF counters and their handling is unique to s390x,
hence no other architectures are be affected.
[ Other Info ]
* The CPU MF hw counters themselves are part of the kernel:
dc7cafd91cba ("s390/cpumf: Update CPU Measurement facility extended
counter set support") and are handled in kernel SRU LP#2114258.
* Hence there is no harm to have the support in s390-tools before having
in the kernel, since in this case the new type info will just not be used.
In case the kernel has support first and libutils is used,
libutil will report "Unknown machine type".
__________
Feature Description:
Support for CPU-MF counters of new IBM Z hardware in kernel,
s390-tools, perf (kernel) and libpfm4.
This part covers the s390-tools changes to lscpumf and libutil.
The related patches / commit IDs will be provided as soon as the
required information has been publicly disclosed.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/2103414/+subscriptions