[PATCH 0/7] drm/xe: Per client usage

Lucas De Marchi lucas.demarchi at intel.com
Tue Apr 16 03:04:47 UTC 2024


Add per-client usage statistics to xe. This ports xe to use the common
method in drm to export the usage to userspace per client (where 1
client == 1 drm fd open).

However insted of using the current format, this creates a new one with
the unit "ticks". The intention here is not to mix the GPU clock domain
with the CPU clock. It allows to cover a few more use cases without
extra complications.

Last patch was a quick implemenation of a gputop-like tool in python.
I ended doing it to cross check the gputop implementation. I's not
really meant to be applied here.

I tested this on DG2 and TGL with kmscube (console-only) and vkcube
(in a gnome session), but it would be good to soak this under more
tests. The biggest goal for this patch series right now is to get
consensus on the new UAPI.

TODO: Add documentation on top with the new interface.

Test-with: https://lore.kernel.org/igt-dev/20240405060056.59379-1-lucas.demarchi@intel.com/

Lucas De Marchi (5):
  drm/xe: Promote xe_hw_engine_class_to_str()
  drm/xe: Add XE_ENGINE_CLASS_OTHER to str conversion
  drm/xe: Add helper to capture engine timestamp
  drm/xe/client: Print runtime to fdinfo
  HACK: simple gputop-like impl in python

Umesh Nerlige Ramappa (2):
  drm/xe/lrc: Add helper to capture context timestamp
  drm/xe: Add helper to capture context runtime

 drivers/gpu/drm/xe/regs/xe_lrc_layout.h       |   1 +
 drivers/gpu/drm/xe/xe_device_types.h          |   9 ++
 drivers/gpu/drm/xe/xe_drm_client.c            |  81 ++++++++++++-
 drivers/gpu/drm/xe/xe_exec_queue.c            |  37 ++++++
 drivers/gpu/drm/xe/xe_exec_queue.h            |   1 +
 drivers/gpu/drm/xe/xe_hw_engine.c             |  29 +++++
 drivers/gpu/drm/xe/xe_hw_engine.h             |   4 +
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c |  18 ---
 drivers/gpu/drm/xe/xe_lrc.c                   |  11 ++
 drivers/gpu/drm/xe/xe_lrc.h                   |   2 +
 drivers/gpu/drm/xe/xe_lrc_types.h             |   3 +
 drivers/gpu/drm/xe/xe_sched_job.c             |   2 +
 pyfdinfo                                      | 113 ++++++++++++++++++
 13 files changed, 292 insertions(+), 19 deletions(-)
 create mode 100755 pyfdinfo

-- 
2.43.0



More information about the Intel-xe mailing list