]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/sched: Add device name to the drm_sched_process_job event
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Mon, 26 May 2025 12:54:45 +0000 (14:54 +0200)
committerPhilipp Stanner <phasta@kernel.org>
Wed, 28 May 2025 14:16:08 +0000 (16:16 +0200)
commitd6b7b46232b78510a12e351b738f493021edf8c3
tree90305a6310a815defba268017cc8a3fda173378c
parent2956554823cedb390b7ec4534afa898176317638
drm/sched: Add device name to the drm_sched_process_job event

Since switching the scheduler from using kthreads to workqueues in
commit a6149f039369 ("drm/sched: Convert drm scheduler to use a work
queue rather than kthread") userspace applications cannot determine
the device from the PID of the threads sending the trace events
anymore.

Each queue had its own kthread which had a given PID for the whole
time. So, at least for amdgpu, it was possible to associate a PID
to the hardware queues of each GPU in the system. Then, when a
drm_run_job trace event was received by userspace, the source PID
allowed to associate it back to the correct GPU.

With workqueues this is not possible anymore, so the event needs to
contain the dev_name() to identify the device.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://lore.kernel.org/r/20250526125505.2360-4-pierre-eric.pelloux-prayer@amd.com
drivers/gpu/drm/scheduler/gpu_scheduler_trace.h