Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/10] PMU Support for per-engine-class activity
@ 2025-01-06  7:55 Riana Tauro
  2025-01-06  7:55 ` [PATCH v3 01/10] [DO NOT REVIEW] drm/xe/pmu: Enable PMU interface Riana Tauro
                   ` (17 more replies)
  0 siblings, 18 replies; 25+ messages in thread
From: Riana Tauro @ 2025-01-06  7:55 UTC (permalink / raw)
  To: intel-xe
  Cc: riana.tauro, anshuman.gupta, umesh.nerlige.ramappa,
	lucas.demarchi, vinay.belgaumkar, ashutosh.dixit, john.c.harrison,
	rodrigo.vivi, aravind.iddamsetty, soham.purkait

The first 5 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 per-engine-class activity

PMU provides two counters (engine-active-ticks, total-ticks)
to calculate engine activity. When querying this, user must group
these 2 counters using the perf_event group mechanism to ensure 
both counters are sampled together.

To list the events

	./perf list
		xe_0000_03_00.0/engine-active-ticks/	[Kernel PMU event]
		xe_0000_03_00.0/total-ticks/		[Kernel PMU event]

The formats to be used with the above are

	engine_class    - config:20-27
        engine_instance - config:12-19
	gt_id           - config:60-63

The events can then be read using perf tool

	./perf stat -e xe_0000_03_00.0/engine-active-ticks,gt_id=0,
				       engine_class=0,engine_instance=0/,
		       xe_0000_03_00.0/total-ticks,gt_id=0,
				       engine_class=0,engine_instance=0/ 
		       -I 1000

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


Rev2: Add trace functions
      fix cosmetic review comments

Rev3: add engine class and instance as parameters
      bump minimum guc to 70.36.0
      replace busyness with engine activity

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

Riana Tauro (6):
  drm/xe/xe_pmu: add fixes for base PMU
  drm/xe: Add per-engine-class activity support
  drm/xe/trace: Add trace for engine activity
  drm/xe/guc: Expose engine activity only for supported GuC version
  drm/xe/pmu: Add PMU support for per-engine-class activity
  drm/xe/guc: Bump minimum required GuC version to v70.36.0

Vinay Belgaumkar (3):
  drm/xe: Add locks in gtidle code
  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                |    3 +
 drivers/gpu/drm/xe/xe_device_types.h          |    4 +
 drivers/gpu/drm/xe/xe_gt.c                    |    5 +
 drivers/gpu/drm/xe/xe_gt_idle.c               |   23 +-
 drivers/gpu/drm/xe/xe_gt_idle.h               |    1 +
 drivers/gpu/drm/xe/xe_gt_idle_types.h         |    3 +
 drivers/gpu/drm/xe/xe_guc.c                   |    5 +
 drivers/gpu/drm/xe/xe_guc_engine_activity.c   |  358 +++++
 drivers/gpu/drm/xe/xe_guc_engine_activity.h   |   19 +
 .../gpu/drm/xe/xe_guc_engine_activity_types.h |   89 ++
 drivers/gpu/drm/xe/xe_guc_fwif.h              |   19 +
 drivers/gpu/drm/xe/xe_guc_types.h             |    4 +
 drivers/gpu/drm/xe/xe_module.c                |    5 +
 drivers/gpu/drm/xe/xe_pmu.c                   | 1163 +++++++++++++++++
 drivers/gpu/drm/xe/xe_pmu.h                   |   30 +
 drivers/gpu/drm/xe/xe_pmu_types.h             |  154 +++
 drivers/gpu/drm/xe/xe_trace_guc.h             |   49 +
 drivers/gpu/drm/xe/xe_uc.c                    |    3 +
 drivers/gpu/drm/xe/xe_uc_fw.c                 |   28 +-
 22 files changed, 1954 insertions(+), 17 deletions(-)
 create mode 100644 drivers/gpu/drm/xe/xe_guc_engine_activity.c
 create mode 100644 drivers/gpu/drm/xe/xe_guc_engine_activity.h
 create mode 100644 drivers/gpu/drm/xe/xe_guc_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.47.1


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2025-01-27 10:06 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-06  7:55 [PATCH v3 00/10] PMU Support for per-engine-class activity Riana Tauro
2025-01-06  7:55 ` [PATCH v3 01/10] [DO NOT REVIEW] drm/xe/pmu: Enable PMU interface Riana Tauro
2025-01-06  7:55 ` [PATCH v3 02/10] [DO NOT REVIEW] drm/xe: Add locks in gtidle code Riana Tauro
2025-01-06  7:55 ` [PATCH v3 03/10] [DO NOT REVIEW] drm/xe/pmu: Add GT C6 events Riana Tauro
2025-01-06  7:55 ` [PATCH v3 04/10] [DO NOT REVIEW] drm/xe/pmu: Add GT frequency events Riana Tauro
2025-01-06  7:55 ` [PATCH v3 05/10] [DO NOT REVIEW] drm/xe/xe_pmu: add fixes for base PMU Riana Tauro
2025-01-06  7:55 ` [PATCH v3 06/10] drm/xe: Add per-engine-class activity support Riana Tauro
2025-01-06  7:55 ` [PATCH v3 07/10] drm/xe/trace: Add trace for engine activity Riana Tauro
2025-01-16 23:08   ` Umesh Nerlige Ramappa
2025-01-06  7:55 ` [PATCH v3 08/10] drm/xe/guc: Expose engine activity only for supported GuC version Riana Tauro
2025-01-16 23:10   ` Umesh Nerlige Ramappa
2025-01-27 10:05     ` Riana Tauro
2025-01-06  7:55 ` [PATCH v3 09/10] drm/xe/pmu: Add PMU support for per-engine-class activity Riana Tauro
2025-01-14  0:57   ` Umesh Nerlige Ramappa
2025-01-17  1:18   ` Umesh Nerlige Ramappa
2025-01-17 13:26     ` Riana Tauro
2025-01-06  7:55 ` [PATCH v3 10/10] drm/xe/guc: Bump minimum required GuC version to v70.36.0 Riana Tauro
2025-01-06  8:28 ` ✓ CI.Patch_applied: success for PMU Support for per-engine-class activity Patchwork
2025-01-06  8:29 ` ✗ CI.checkpatch: warning " Patchwork
2025-01-06  8:30 ` ✓ CI.KUnit: success " Patchwork
2025-01-06  8:48 ` ✓ CI.Build: " Patchwork
2025-01-06  8:50 ` ✗ CI.Hooks: failure " Patchwork
2025-01-06  8:52 ` ✓ CI.checksparse: success " Patchwork
2025-01-06  9:18 ` ✓ Xe.CI.BAT: " Patchwork
2025-01-06 17:10 ` ✗ Xe.CI.Full: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox