[PATCH v3 0/4] Improve gpu_scheduler trace events

Pierre-Eric Pelloux-Prayer pierre-eric.pelloux-prayer at amd.com
Thu Jun 6 13:06:21 UTC 2024


Hi,

This is the new version of my patch series aiming at improving the
trace events around gpu jobs.
The main ideas implemented are: trace dependencies between jobs and
identify the GPU running jobs (because 'ring' is not a unique attribute).

Changes from v2:
* dropped all amdgpu changes. The goal here is to make the gpu_scheduler
trace events usable by a tool, without dependencies on driver-specific
events
* dropped the vblank related changes. I'll post a separate series to
cover drm/vblank events later.
* reworked fence printing so it's coherent between all events.
* added a dev_index to let the tools parsing the events which GPU is
running a job. It wasn't needed before the gpu scheduler switch to
workqueues because the queue pid was enough to identify the hardware queue.
* dropped the changes to trace the "why" of a dependency. I implemented
a version based on Sima's suggestion using xa_tag_pointer but I'm not
convinced it's really useful, so I'm dropping it for now.

Open questions:
* assuming the new fence printing format is agreed on,
should we add some code to preserve the old format?
* checkpatch doesn't like the indentation in the last patch, because
everything is vertically aligned to 'TP_fast_assign('. How to best fix it?
  
   WARNING: Statements should start on a tabstop
   #82: FILE: drivers/gpu/drm/scheduler/gpu_scheduler_trace.h:80:
   +        unsigned long idx;


v2: https://lists.freedesktop.org/archives/dri-devel/2024-February/441341.html

Pierre-Eric Pelloux-Prayer (4):
  drm/sched: store the drm_device instead of the device
  drm/sched: add dev_index=xx to the drm_sched_process_job event
  drm/sched: cleanup gpu_scheduler trace events
  drm/sched: trace dependencies for gpu jobs

 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c    |  2 +-
 drivers/gpu/drm/etnaviv/etnaviv_sched.c       |  2 +-
 drivers/gpu/drm/imagination/pvr_queue.c       |  2 +-
 drivers/gpu/drm/lima/lima_sched.c             |  2 +-
 drivers/gpu/drm/msm/msm_ringbuffer.c          |  2 +-
 drivers/gpu/drm/nouveau/nouveau_sched.c       |  2 +-
 drivers/gpu/drm/panfrost/panfrost_job.c       |  2 +-
 drivers/gpu/drm/panthor/panthor_mmu.c         |  2 +-
 drivers/gpu/drm/panthor/panthor_sched.c       |  2 +-
 .../gpu/drm/scheduler/gpu_scheduler_trace.h   | 88 +++++++++++++++----
 drivers/gpu/drm/scheduler/sched_entity.c      | 11 ++-
 drivers/gpu/drm/scheduler/sched_main.c        | 28 +++---
 drivers/gpu/drm/v3d/v3d_sched.c               | 12 +--
 drivers/gpu/drm/xe/xe_execlist.c              |  2 +-
 drivers/gpu/drm/xe/xe_gpu_scheduler.c         |  2 +-
 drivers/gpu/drm/xe/xe_gpu_scheduler.h         |  2 +-
 drivers/gpu/drm/xe/xe_guc_submit.c            |  2 +-
 include/drm/gpu_scheduler.h                   |  4 +-
 18 files changed, 115 insertions(+), 54 deletions(-)

-- 
2.40.1



More information about the dri-devel mailing list