[LTP] [PATCH v6 0/3] pmc_core: cover the PkgC LTR blocker counters

Piotr Kubaj piotr.kubaj@intel.com
Mon Nov 30 12:58:58 CET 2026


Tests for the pkgc_ltr_blocker_show debugfs file of intel_pmc_core
(kernel v7.2). Depends on "lib: add tst_test.needs_debugfs flag" (v5 1/3)
with the implied needs_root removed, which is not resent here.

Tested on Nova Lake-S running 7.4.0-rc1.

v5 -> v6:
- Both tests set .needs_root themselves and drop .tags.
- New SAFE_SCHED_GETAFFINITY() and SAFE_SCHED_SETAFFINITY().
- pkgc_ltr_blocker_show: strtoull() end pointer check, no global fails
  counter, count check moved into second_sample_differs().
- ltr_counter: idle phase bounded by .runtime, TCONF in a VM or with a
  restricted affinity mask, two burst periods of silence required.
- Dropped the claim that the tests catch a wrong telemetry offset.

Piotr Kubaj (3):
  pmc_core: add test for pkgc_ltr_blocker_show
  lib: add SAFE_SCHED_GETAFFINITY() and SAFE_SCHED_SETAFFINITY()
  pmc_core: add ltr_counter test

 doc/developers/api_c_tests.rst                |   4 +
 include/tst_safe_sched.h                      |  83 ++++
 runtest/power_management_tests                |   2 +
 testcases/kernel/power_management/.gitignore  |   2 +
 .../kernel/power_management/ltr_counter.c     | 363 ++++++++++++++++++
 .../power_management/pkgc_ltr_blocker_show.c  | 291 ++++++++++++++
 6 files changed, 745 insertions(+)
 create mode 100644 include/tst_safe_sched.h
 create mode 100644 testcases/kernel/power_management/ltr_counter.c
 create mode 100644 testcases/kernel/power_management/pkgc_ltr_blocker_show.c


base-commit: 0e2b5ce4294ec8642853688ef47c35eb0e35da08
prerequisite-patch-id: 1d5717365b9b15d4bd8f5e80d78a0498f8ef70c5
-- 
2.47.3

---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.
Spolka oswiadcza, ze posiada status duzego przedsiebiorcy w rozumieniu ustawy z dnia 8 marca 2013 r. o przeciwdzialaniu nadmiernym opoznieniom w transakcjach handlowych.

Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.



More information about the ltp mailing list