Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/10] Engine Busyness
@ 2023-12-14 11:31 Riana Tauro
  2023-12-14 11:31 ` [PATCH v3 01/10] drm/xe/pmu: Remove PMU from Xe till uapi is finalized Riana Tauro
                   ` (12 more replies)
  0 siblings, 13 replies; 20+ messages in thread
From: Riana Tauro @ 2023-12-14 11:31 UTC (permalink / raw)
  To: intel-xe

The first two patches are added for compilation and are
part of https://patchwork.freedesktop.org/series/127664/

GuC provides engine busyness ticks as a 64 bit counter which count
as clock ticks. These counters are maintained in a
shared memory buffer and internally updated on a continuous basis.

GuC also provides a periodically total active ticks that GT has been
active for. This counter is exposed to the user such that busyness can
be calculated as a percentage using

busyness % = (engine active ticks/total active ticks) * 100.

This can be listed as

sudo ./perf list
     xe_0000_03_00.0/total-active-ticks-gt0/            [Kernel PMU event]
     xe_0000_03_00.0/bcs0-busy-ticks-gt0/               [Kernel PMU event]
     xe_0000_03_00.0/ccs0-busy-ticks-gt0/               [Kernel PMU event]
     xe_0000_03_00.0/rcs0-busy-ticks-gt0/               [Kernel PMU event]
     xe_0000_03_00.0/vcs0-busy-ticks-gt0/               [Kernel PMU event]
     xe_0000_03_00.0/vecs0-busy-ticks-gt0/              [Kernel PMU event]

and can be read as

        sudo ./perf stat -e xe_0000_03_00.0/bcs0-busy-ticks-gt0/,xe_0000_03_00.0/total-active-ticks-gt0/  -I 1000

v2: rebase
    fix review comments

v3: rebase
    add dropping of group busyness changes
    add pmu base implementation

Aravind Iddamsetty (1):
  RFC drm/xe/pmu: Enable PMU interface and add engine busyness counter

Ashutosh Dixit (2):
  drm/xe/pmu: Remove PMU from Xe till uapi is finalized
  fixup! drm/xe/uapi: Reject bo creation of unaligned size

Riana Tauro (7):
  drm/xe: Move user engine class mappings to functions
  RFC drm/xe/guc: Add interface for engine busyness ticks
  RFC drm/xe/uapi: Add configs for Engine busyness
  RFC drm/xe/guc: Add PMU counter for total active ticks
  RFC drm/xe/guc: Expose engine busyness only for supported GuC version
  RFC drm/xe/guc: Dynamically enable/disable engine busyness stats
  RFC drm/xe/guc: Handle runtime suspend issues for engine busyness

 drivers/gpu/drm/xe/Makefile                 |   5 +-
 drivers/gpu/drm/xe/abi/guc_actions_abi.h    |   1 +
 drivers/gpu/drm/xe/regs/xe_gt_regs.h        |   5 -
 drivers/gpu/drm/xe/tests/xe_dma_buf.c       |   2 +
 drivers/gpu/drm/xe/xe_device.c              |   4 +-
 drivers/gpu/drm/xe/xe_device_types.h        |   6 +-
 drivers/gpu/drm/xe/xe_exec_queue.c          |  19 +-
 drivers/gpu/drm/xe/xe_gt.c                  |  41 ++-
 drivers/gpu/drm/xe/xe_gt.h                  |   3 +
 drivers/gpu/drm/xe/xe_guc.c                 |   7 +
 drivers/gpu/drm/xe/xe_guc_engine_busyness.c | 375 ++++++++++++++++++++
 drivers/gpu/drm/xe/xe_guc_engine_busyness.h |  22 ++
 drivers/gpu/drm/xe/xe_guc_fwif.h            |  15 +
 drivers/gpu/drm/xe/xe_guc_types.h           |  25 ++
 drivers/gpu/drm/xe/xe_hw_engine.c           |  50 +++
 drivers/gpu/drm/xe/xe_hw_engine.h           |   3 +
 drivers/gpu/drm/xe/xe_pmu.c                 | 326 ++++++++---------
 drivers/gpu/drm/xe/xe_pmu.h                 |   2 +
 drivers/gpu/drm/xe/xe_pmu_types.h           |  19 -
 drivers/gpu/drm/xe/xe_query.c               |  23 +-
 include/uapi/drm/xe_drm.h                   |  50 ++-
 21 files changed, 756 insertions(+), 247 deletions(-)
 create mode 100644 drivers/gpu/drm/xe/xe_guc_engine_busyness.c
 create mode 100644 drivers/gpu/drm/xe/xe_guc_engine_busyness.h

-- 
2.40.0


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

end of thread, other threads:[~2023-12-18 18:46 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-14 11:31 [PATCH v3 00/10] Engine Busyness Riana Tauro
2023-12-14 11:31 ` [PATCH v3 01/10] drm/xe/pmu: Remove PMU from Xe till uapi is finalized Riana Tauro
2023-12-15  3:51   ` Aravind Iddamsetty
2023-12-18  5:30     ` Riana Tauro
2023-12-14 11:31 ` [PATCH v3 02/10] fixup! drm/xe/uapi: Reject bo creation of unaligned size Riana Tauro
2023-12-14 13:31   ` Rodrigo Vivi
2023-12-18  5:26     ` Riana Tauro
2023-12-14 11:31 ` [PATCH v3 03/10] drm/xe: Move user engine class mappings to functions Riana Tauro
2023-12-14 11:31 ` [PATCH v3 04/10] RFC drm/xe/guc: Add interface for engine busyness ticks Riana Tauro
2023-12-15  2:48   ` Nilawar, Badal
2023-12-18  6:07     ` Riana Tauro
2023-12-14 11:31 ` [PATCH v3 05/10] RFC drm/xe/uapi: Add configs for Engine busyness Riana Tauro
2023-12-14 11:31 ` [PATCH v3 06/10] RFC drm/xe/pmu: Enable PMU interface and add engine busyness counter Riana Tauro
2023-12-14 11:31 ` [PATCH v3 07/10] RFC drm/xe/guc: Add PMU counter for total active ticks Riana Tauro
2023-12-14 11:31 ` [PATCH v3 08/10] RFC drm/xe/guc: Expose engine busyness only for supported GuC version Riana Tauro
2023-12-14 11:31 ` [PATCH v3 09/10] RFC drm/xe/guc: Dynamically enable/disable engine busyness stats Riana Tauro
2023-12-14 11:31 ` [PATCH v3 10/10] RFC drm/xe/guc: Handle runtime suspend issues for engine busyness Riana Tauro
2023-12-14 12:59 ` ✓ CI.Patch_applied: success for Engine Busyness (rev3) Patchwork
2023-12-14 12:59 ` ✗ CI.checkpatch: warning " Patchwork
2023-12-14 13:00 ` ✗ CI.KUnit: failure " Patchwork

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