[PATCH 1/4] drm/sched: Mark scheduler work queues with WQ_MEM_RECLAIM

Matthew Brost matthew.brost at intel.com
Mon Oct 21 17:57:02 UTC 2024


DRM scheduler work queues are used to submit jobs, jobs are in the path
or dma-fences, and dma-fences are in the path of reclaim. Mark scheduler
work queues with WQ_MEM_RECLAIM so these work queues can continue to
make forward progress during reclaim.

Cc: Luben Tuikov <ltuikov89 at gmail.com>
Cc: Danilo Krummrich <dakr at kernel.org>
Cc: Philipp Stanner <pstanner at redhat.com>
Signed-off-by: Matthew Brost <matthew.brost at intel.com>
---
 drivers/gpu/drm/scheduler/sched_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c
index 6e4d004d09ce..567811957c0f 100644
--- a/drivers/gpu/drm/scheduler/sched_main.c
+++ b/drivers/gpu/drm/scheduler/sched_main.c
@@ -1275,10 +1275,10 @@ int drm_sched_init(struct drm_gpu_scheduler *sched,
 		sched->own_submit_wq = false;
 	} else {
 #ifdef CONFIG_LOCKDEP
-		sched->submit_wq = alloc_ordered_workqueue_lockdep_map(name, 0,
+		sched->submit_wq = alloc_ordered_workqueue_lockdep_map(name, WQ_MEM_RECLAIM,
 								       &drm_sched_lockdep_map);
 #else
-		sched->submit_wq = alloc_ordered_workqueue(name, 0);
+		sched->submit_wq = alloc_ordered_workqueue(name, WQ_MEM_RECLAIM);
 #endif
 		if (!sched->submit_wq)
 			return -ENOMEM;
-- 
2.34.1



More information about the Intel-xe mailing list