Skip to content

Improve gpu_scheduler trace events + UAPI

Pierre-Eric Pelloux-Prayer amd-gfx dri-devel intel-xe linux-arm-msm linux-doc linux-media lkml nouveau 9 versions – Applied

Status from this message: Applied to drm-misc-next

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v11 Latest10 patches 3 repliesApplied
  2. v1010 patches 0 repliesSuperseded
  3. v910 patches 13 repliesSuperseded
Earlier versions · 6
VersionPostedPatchesRepliesStatus
v810 patches9 repliesSuperseded
v77 patches3 repliesSuperseded
v67 patches19 repliesSuperseded
v54 patches11 repliesSuperseded
v43 patches2 repliesSuperseded
v34 patches7 repliesSuperseded

Changes in v11 from the cover letter

* fixed 2 errors reported by kernel test robot
* rebased on drm-misc-next

Patches in v11 Applied

#Subject and filesSizeRepliesApplied
1/10drm/debugfs: Output client_id in in drm_clients_infodrivers/gpu/drm/drm_debugfs.c+6 -40 replies
2/10drm/sched: Store the drm client_id in drm_sched_fencedrivers/accel/amdxdna/aie2_ctx.c drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +23 more+64 -342 replies
3/10drm/sched: Add device name to the drm_sched_process_job eventdrivers/gpu/drm/scheduler/gpu_scheduler_trace.h+4 -20 replies
4/10drm/sched: Cleanup gpu_scheduler trace eventsdrivers/gpu/drm/scheduler/gpu_scheduler_trace.h+23 -210 replies
5/10drm/sched: Trace dependencies for GPU jobsdrivers/gpu/drm/scheduler/gpu_scheduler_trace.h drivers/gpu/drm/scheduler/sched_entity.c+31 -00 replies
6/10drm/sched: Add the drm_client_id to the drm_sched_run/exec_job eventsdrivers/gpu/drm/scheduler/gpu_scheduler_trace.h+4 -20 replies
7/10drm/sched: Cleanup event namesdrivers/gpu/drm/scheduler/gpu_scheduler_trace.h drivers/gpu/drm/scheduler/sched_entity.c drivers/gpu/drm/scheduler/sched_main.c+10 -100 replies
8/10drm: Get rid of drm_sched_job.iddrivers/gpu/drm/amd/amdgpu/amdgpu_trace.h drivers/gpu/drm/lima/lima_trace.h drivers/gpu/drm/scheduler/gpu_scheduler_trace.h +2 more+14 -320 replies
9/10drm/doc: Document some tracepoints as uAPIDocumentation/gpu/drm-uapi.rst drivers/gpu/drm/scheduler/gpu_scheduler_trace.h+41 -00 replies
10/10drm/amdgpu: update trace format to match gpu_scheduler_tracedrivers/gpu/drm/amd/amdgpu/amdgpu_trace.h+10 -120 replies

Reviews trailers per patch

All 10 patches have a Reviewed-by or Acked-by.

PatchChristian KönigTvrtko UrsulinPhilipp StannerArvind YadavLucas StachMaíra Canal
1/10R-b
2/10R-b
3/10R-b
4/10R-b
5/10R-b
6/10R-b A-b
7/10R-b
8/10R-b R-b
9/10R-b A-b A-b
10/10R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 6 reviewers.

Read the v11 thread

Cover letter [PATCH v11 00/10] Improve gpu_scheduler trace events + UAPI

Hi,

The initial goal of this series was to improve the drm and amdgpu trace events to be able to expose more of the inner workings of the scheduler and drivers to developers via tools.

Then, the series evolved to become focused only on gpu_scheduler. The changes around vblank events will be part of a different series, as well as the amdgpu ones.

Moreover Sima suggested to make some trace events stable uAPI, so tools can rely on them long term.

The first patches extend and cleanup the gpu scheduler events, then add a documentation entry in drm-uapi.rst.

The last 2 patches are new in v8. One is based on a suggestion from Tvrtko and gets rid of drm_sched_job::id. The other is a cleanup of amdgpu trace events to use the fence=%llu:%llu format.

The drm_sched_job patches don't affect gpuvis which has code to parse the gpu_scheduler events but these events are not enabled.

Changes since v10:
* fixed 2 errors reported by kernel test robot
* rebased on drm-misc-next

Changes since v9:
* fixed documentation link syntax
* fixed typos in commit messages
* spelled out that these events cannot be used before drm_sched_job_arm has been called

Changes since v8:
* swapped patches 8 & 9
* rebased on drm-next

Changes since v7:
* uint64_t -> u64
* reworked dependencies tracing (Tvrtko)
* use common name prefix for all events (Tvrtko)
* dropped drm_sched_job::id (Tvrtko)

Useful links:
- userspace tool using the updated events:
https://gitlab.freedesktop.org/tomstdenis/umr/-/merge_requests/37
- v8:
https://lists.freedesktop.org/archives/dri-devel/2025-March/496781.html

Pierre-Eric Pelloux-Prayer (10):
drm/debugfs: Output client_id in in drm_clients_info drm/sched: Store the drm client_id in drm_sched_fence drm/sched: Add device name to the drm_sched_process_job event drm/sched: Cleanup gpu_scheduler trace events
drm/sched: Trace dependencies for GPU jobs
drm/sched: Add the drm_client_id to the drm_sched_run/exec_job events drm/sched: Cleanup event names
drm: Get rid of drm_sched_job.id
drm/doc: Document some tracepoints as uAPI
drm/amdgpu: update trace format to match gpu_scheduler_trace

 Documentation/gpu/drm-uapi.rst                |  19 ++++
 drivers/accel/amdxdna/aie2_ctx.c              |   3 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c    |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c        |   3 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_job.c       |   8 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_job.h       |   3 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h     |  32 ++----
 drivers/gpu/drm/drm_debugfs.c                 |  10 +-
 drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c  |   2 +-
 drivers/gpu/drm/imagination/pvr_job.c         |   2 +-
 drivers/gpu/drm/imagination/pvr_queue.c       |   5 +-
 drivers/gpu/drm/imagination/pvr_queue.h       |   2 +-
 drivers/gpu/drm/lima/lima_gem.c               |   2 +-
 drivers/gpu/drm/lima/lima_sched.c             |   6 +-
 drivers/gpu/drm/lima/lima_sched.h             |   3 +-
 drivers/gpu/drm/lima/lima_trace.h             |   6 +-
 drivers/gpu/drm/msm/msm_gem_submit.c          |   8 +-
 drivers/gpu/drm/nouveau/nouveau_sched.c       |   3 +-
 drivers/gpu/drm/panfrost/panfrost_drv.c       |   2 +-
 drivers/gpu/drm/panthor/panthor_drv.c         |   3 +-
 drivers/gpu/drm/panthor/panthor_mmu.c         |   2 +-
 drivers/gpu/drm/panthor/panthor_sched.c       |   5 +-
 drivers/gpu/drm/panthor/panthor_sched.h       |   3 +-
 .../gpu/drm/scheduler/gpu_scheduler_trace.h   | 103 +++++++++++++-----
 drivers/gpu/drm/scheduler/sched_entity.c      |  16 ++-
 drivers/gpu/drm/scheduler/sched_fence.c       |   4 +-
 drivers/gpu/drm/scheduler/sched_internal.h    |   2 +-
 drivers/gpu/drm/scheduler/sched_main.c        |  12 +-
 .../gpu/drm/scheduler/tests/mock_scheduler.c  |   3 +-
 drivers/gpu/drm/v3d/v3d_submit.c              |   2 +-
 drivers/gpu/drm/xe/xe_sched_job.c             |   3 +-
 include/drm/gpu_scheduler.h                   |  13 ++-
 32 files changed, 191 insertions(+), 101 deletions(-)
Signature · 1 line
2.43.0