[PATCH 0/7] Add PMU support for single engine busyness

Riana Tauro riana.tauro at intel.com
Wed Nov 13 04:55:42 UTC 2024


The first 3 patches of the series are taken from
https://patchwork.freedesktop.org/series/139121/. They are added
only for compilation and does not require review.

This series adds support for single engine busyness.

PMU provides two counters (<engine>-busy-ticks-gt<n>,
<engine>-total-ticks-gt<n>) to calculate engine busyness. When querying
engine busyness, user must group these 2 counters using the perf_event
group mechanism to ensure both counters are sampled together.

To list engine busyness counters use the following

./perf list
  xe_0000_03_00.0/bcs0-busy-ticks-gt0/               [Kernel PMU event]
  xe_0000_03_00.0/bcs0-total-ticks-gt0/              [Kernel PMU event]
  xe_0000_03_00.0/ccs0-busy-ticks-gt0/               [Kernel PMU event]
  xe_0000_03_00.0/ccs0-total-ticks-gt0/              [Kernel PMU event]

Engine busyness can then be calculated as below
busyness % = (engine active ticks/total ticks) * 100

Aravind Iddamsetty (1):
  drm/xe/pmu: Enable PMU interface

Riana Tauro (4):
  drm/xe: add function to convert xe hw engine class to user class
  drm/xe: Add single engine busyness support
  drm/xe/guc: Expose engine busyness only for supported GuC version
  drm/xe/pmu: Add PMU support for engine busyness

Vinay Belgaumkar (2):
  drm/xe/pmu: Add GT C6 events
  drm/xe/pmu: Add GT frequency events

 drivers/gpu/drm/xe/Makefile                   |    3 +
 drivers/gpu/drm/xe/abi/guc_actions_abi.h      |    1 +
 drivers/gpu/drm/xe/regs/xe_gt_regs.h          |    2 +
 drivers/gpu/drm/xe/xe_device.c                |    6 +
 drivers/gpu/drm/xe/xe_device_types.h          |    4 +
 drivers/gpu/drm/xe/xe_engine_activity.c       |  339 +++++
 drivers/gpu/drm/xe/xe_engine_activity.h       |   18 +
 drivers/gpu/drm/xe/xe_engine_activity_types.h |   85 ++
 drivers/gpu/drm/xe/xe_gt.c                    |    4 +
 drivers/gpu/drm/xe/xe_gt_idle.c               |   17 +-
 drivers/gpu/drm/xe/xe_gt_idle.h               |    1 +
 drivers/gpu/drm/xe/xe_guc.c                   |    5 +
 drivers/gpu/drm/xe/xe_guc_fwif.h              |   19 +
 drivers/gpu/drm/xe/xe_guc_types.h             |    4 +
 drivers/gpu/drm/xe/xe_hw_engine.c             |   25 +
 drivers/gpu/drm/xe/xe_hw_engine.h             |    1 +
 drivers/gpu/drm/xe/xe_module.c                |    5 +
 drivers/gpu/drm/xe/xe_pmu.c                   | 1191 +++++++++++++++++
 drivers/gpu/drm/xe/xe_pmu.h                   |   30 +
 drivers/gpu/drm/xe/xe_pmu_types.h             |  176 +++
 drivers/gpu/drm/xe/xe_query.c                 |   12 +-
 drivers/gpu/drm/xe/xe_uc.c                    |    3 +
 22 files changed, 1936 insertions(+), 15 deletions(-)
 create mode 100644 drivers/gpu/drm/xe/xe_engine_activity.c
 create mode 100644 drivers/gpu/drm/xe/xe_engine_activity.h
 create mode 100644 drivers/gpu/drm/xe/xe_engine_activity_types.h
 create mode 100644 drivers/gpu/drm/xe/xe_pmu.c
 create mode 100644 drivers/gpu/drm/xe/xe_pmu.h
 create mode 100644 drivers/gpu/drm/xe/xe_pmu_types.h

-- 
2.40.0



More information about the Intel-xe mailing list