Skip to content

Commit 746ae46

Browse files
mbrost05rodrigovivi
authored andcommitted
drm/sched: Mark scheduler work queues with WQ_MEM_RECLAIM
drm_gpu_scheduler.submit_wq is used to submit jobs, jobs are in the path of dma-fences, and dma-fences are in the path of reclaim. Mark scheduler work queue with WQ_MEM_RECLAIM to ensure forward progress during reclaim; without WQ_MEM_RECLAIM, work queues cannot make forward progress during reclaim. v2: - Fixes tags (Philipp) - Reword commit message (Philipp) Cc: Luben Tuikov <[email protected]> Cc: Danilo Krummrich <[email protected]> Cc: Philipp Stanner <[email protected]> Cc: [email protected] Fixes: 34f50cc ("drm/sched: Use drm sched lockdep map for submit_wq") Fixes: a6149f0 ("drm/sched: Convert drm scheduler to use a work queue rather than kthread") Signed-off-by: Matthew Brost <[email protected]> Acked-by: Nirmoy Das <[email protected]> Reviewed-by: Philipp Stanner <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Rodrigo Vivi <[email protected]>
1 parent fc5ced7 commit 746ae46

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/gpu/drm/scheduler/sched_main.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1276,10 +1276,11 @@ int drm_sched_init(struct drm_gpu_scheduler *sched,
12761276
sched->own_submit_wq = false;
12771277
} else {
12781278
#ifdef CONFIG_LOCKDEP
1279-
sched->submit_wq = alloc_ordered_workqueue_lockdep_map(name, 0,
1279+
sched->submit_wq = alloc_ordered_workqueue_lockdep_map(name,
1280+
WQ_MEM_RECLAIM,
12801281
&drm_sched_lockdep_map);
12811282
#else
1282-
sched->submit_wq = alloc_ordered_workqueue(name, 0);
1283+
sched->submit_wq = alloc_ordered_workqueue(name, WQ_MEM_RECLAIM);
12831284
#endif
12841285
if (!sched->submit_wq)
12851286
return -ENOMEM;

0 commit comments

Comments
 (0)