All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/8] Engine busyness
@ 2023-12-22  7:45 Riana Tauro
  2023-12-22  7:45 ` [PATCH v4 1/8] drm/xe: Move user engine class mappings to functions Riana Tauro
                   ` (7 more replies)
  0 siblings, 8 replies; 23+ messages in thread
From: Riana Tauro @ 2023-12-22  7:45 UTC (permalink / raw)
  To: intel-xe

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 (GuC loaded and running). 
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

v4: rebase
    fix review comments

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

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

 drivers/gpu/drm/xe/Makefile                 |   3 +
 drivers/gpu/drm/xe/abi/guc_actions_abi.h    |   1 +
 drivers/gpu/drm/xe/xe_device.c              |   2 +
 drivers/gpu/drm/xe/xe_device_types.h        |   4 +
 drivers/gpu/drm/xe/xe_exec_queue.c          |  19 +-
 drivers/gpu/drm/xe/xe_gt.c                  |  39 ++
 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 | 371 +++++++++++
 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           |  51 ++
 drivers/gpu/drm/xe/xe_hw_engine.h           |   3 +
 drivers/gpu/drm/xe/xe_module.c              |   5 +
 drivers/gpu/drm/xe/xe_pmu.c                 | 655 ++++++++++++++++++++
 drivers/gpu/drm/xe/xe_pmu.h                 |  27 +
 drivers/gpu/drm/xe/xe_pmu_types.h           |  49 ++
 drivers/gpu/drm/xe/xe_query.c               |  23 +-
 include/uapi/drm/xe_drm.h                   |  60 ++
 20 files changed, 1346 insertions(+), 38 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
 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


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

end of thread, other threads:[~2024-01-19 12:19 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-22  7:45 [PATCH v4 0/8] Engine busyness Riana Tauro
2023-12-22  7:45 ` [PATCH v4 1/8] drm/xe: Move user engine class mappings to functions Riana Tauro
2024-01-04  5:04   ` Aravind Iddamsetty
2024-01-05  5:31     ` Riana Tauro
2023-12-22  7:45 ` [PATCH v4 2/8] drm/xe/guc: Add interface for engine busyness ticks Riana Tauro
2023-12-22  7:45 ` [PATCH v4 3/8] drm/xe/uapi: Add configs for Engine busyness Riana Tauro
2024-01-03  5:26   ` Aravind Iddamsetty
2024-01-03  6:40     ` Riana Tauro
2024-01-03  7:02       ` Aravind Iddamsetty
2024-01-03  7:06         ` Riana Tauro
2024-01-03  7:08           ` Riana Tauro
2023-12-22  7:45 ` [PATCH v4 4/8] drm/xe/pmu: Enable PMU interface and add engine busyness counter Riana Tauro
2024-01-03  5:03   ` Aravind Iddamsetty
     [not found]     ` <85zfxnrlv0.wl-ashutosh.dixit@intel.com>
2024-01-03  6:16       ` Dixit, Ashutosh
2023-12-22  7:45 ` [PATCH v4 5/8] drm/xe/guc: Add PMU counter for total active ticks Riana Tauro
2023-12-22 20:03   ` Belgaumkar, Vinay
2024-01-03  6:54   ` Aravind Iddamsetty
2023-12-22  7:46 ` [PATCH v4 6/8] drm/xe/guc: Expose engine busyness only for supported GuC version Riana Tauro
2024-01-18  6:13   ` Nilawar, Badal
2024-01-19 10:13     ` Riana Tauro
2024-01-19 12:18       ` Nilawar, Badal
2023-12-22  7:46 ` [PATCH v4 7/8] drm/xe/guc: Dynamically enable/disable engine busyness stats Riana Tauro
2023-12-22  7:46 ` [PATCH v4 8/8] drm/xe/guc: Handle runtime suspend issues for engine busyness Riana Tauro

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.