drm/todo: Add section for GPU Scheduler
Subsystems (3)
v2 cover drm/todo: Add section for GPU Scheduler
Changes in v2:
- Fix wrong list item index in patch 1.
The GPU Scheduler has enough problems to be covered by the drm todo list. Let's add an entry.
This series is the succesor of [1].
[1] https://lore.kernel.org/dri-devel/[email protected]/
Philipp Stanner (2):
drm/todo: Add section with task for GPU scheduler drm/todo: Add entry for unlocked drm/sched rq readers
Documentation/gpu/todo.rst | 45 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+)
Signature · 1 line
2.49.0
PATCH v2 1/2 drm/todo: Add section with task for GPU scheduler
The GPU scheduler has a great many problems and deserves its own TODO section.
Add a section and a first task describing the problem of drm_sched_resubmit_jobs() being deprecated without a successor.
--- Documentation/gpu/todo.rst | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+)
Documentation/gpu/todo.rst +31 -0
@@ -878,6 +878,37 @@ Contact: Christian König Level: Starter +DRM GPU Scheduler +================= + +Provide a universal successor for drm_sched_resubmit_jobs() +------------------------------------------------------------ + +drm_sched_resubmit_jobs() is deprecated. Main reason being that it leads to +reinitializing dma_fences. See that function's docu for details. The better +approach for valid resubmissions by amdgpu and Xe is (apparently) to figure out +which job (and, through association: which entity) caused the hang. Then, the +job's buffer data, together with all other jobs' buffer data currently in the +same hardware ring, must be invalidated. This can for example be done by +overwriting it. amdgpu currently determines which jobs are in the ring and need +to be overwritten by keeping copies of the job. Xe obtains that information by +directly accessing drm_sched's pending_list. + +Tasks: + +1. implement scheduler functionality through which the driver can obtain the + information which *broken* jobs are currently in the hardware ring. +2. Such infrastructure would then typically be used in + drm_sched_backend_ops.timedout_job(). Document that. +3. Port a driver as first user. +4. Document the new alternative in the docu of deprecated + drm_sched_resubmit_jobs(). + +Contact: Christian König <[email protected]> + Philipp Stanner <[email protected]> + +Level: Advanced + Outside DRM ===========
Signature · 1 line
2.49.0
PATCH v2 2/2 drm/todo: Add entry for unlocked drm/sched rq readers
In reply to Philipp StannerRunqueues are currently almost everywhere being read unlocked in drm/sched. At XDC 2025, the assembled developers were unsure whether that's legal and whether it can be fixed. Someone should find out.
Add a todo entry for the unlocked runqueue reader problem.
--- Documentation/gpu/todo.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
Documentation/gpu/todo.rst +14 -0
@@ -909,6 +909,20 @@ Contact: Christian König <[email protected]> Level: Advanced +Add locking for runqueues +------------------------- + +There is an old FIXME by Sima in include/drm/gpu_scheduler.h. It details that +struct drm_sched_rq is read at many places without any locks, not even with a +READ_ONCE. At XDC 2025 no one could really tell why that is the case, whether +locks are needed and whether they could be added. (But for real, that should +probably be locked!). Check whether it's possible to add locks everywhere, and +do so if yes. + +Contact: Philipp Stanner <[email protected]> + +Level: Intermediate + Outside DRM ===========
Signature · 1 line
2.49.0
+Cc Matthew, Tvrtko, Christian
Quoted 6 lines · Philipp Stanner
Changes in v2:
- Fix wrong list item index in patch 1.The GPU Scheduler has enough problems to be covered by the drm todo list. Let's add an entry.
Quoted 7 lines
This series is the succesor of [1].
[1] https://lore.kernel.org/dri-devel/[email protected]/
Philipp Stanner (2):
drm/todo: Add section with task for GPU scheduler drm/todo: Add entry for unlocked drm/sched rq readers
Can someone give this series a review please?
Thx,
P.
Quoted 22 lines · Philipp Stanner
+Cc Matthew, Tvrtko, Christian
Quoted 6 lines · Philipp Stanner
Changes in v2:
- Fix wrong list item index in patch 1.The GPU Scheduler has enough problems to be covered by the drm todo list. Let's add an entry.
Quoted 7 lines
This series is the succesor of [1].
[1] https://lore.kernel.org/dri-devel/[email protected]/
Philipp Stanner (2):
drm/todo: Add section with task for GPU scheduler drm/todo: Add entry for unlocked drm/sched rq readersCan someone give this series a review please?
Thx,
P.
Philipp Stanner
AppliedQuoted 20 lines · Dave Airlie
Acked-by Dave Airlie <[email protected]>Quoted 17 lines · Philipp Stanner
+Cc Matthew, Tvrtko, Christian
Quoted 13 lines · Philipp Stanner
Changes in v2:
- Fix wrong list item index in patch 1.The GPU Scheduler has enough problems to be covered by the drm todo list. Let's add an entry.
This series is the succesor of [1].
[1] https://lore.kernel.org/dri-devel/[email protected]/
Philipp Stanner (2):
drm/todo: Add section with task for GPU scheduler drm/todo: Add entry for unlocked drm/sched rq readers
Pushed to drm-misc-next
P.