All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-xe] [PATCH] drm/xe: Fix potential deadlock handling page faults
@ 2023-03-21  3:42 Matthew Brost
  2023-03-21  3:44 ` [Intel-xe] ✓ CI.Patch_applied: success for drm/xe: Fix potential deadlock handling page faults (rev2) Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Matthew Brost @ 2023-03-21  3:42 UTC (permalink / raw)
  To: intel-xe

Within a class the GuC will hault scheduling if the head of the queue
can't be scheduled the queue will block. This can lead to deadlock if
BCS0-7 all have faults and another engine on BCS0-7 is at head of the
GuC scheduling queue as the migration engine used to fix tthe fault will
be blocked. To work around this set the migration engine to the highest
priority when servicing page faults.

v2 (Maarten): Set priority to kernel once at creation

Signed-off-by: Matthew Brost <matthew.brost@intel.com>
---
 drivers/gpu/drm/xe/xe_migrate.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_migrate.c b/drivers/gpu/drm/xe/xe_migrate.c
index 77a6d71f6e89..546711a0ec39 100644
--- a/drivers/gpu/drm/xe/xe_migrate.c
+++ b/drivers/gpu/drm/xe/xe_migrate.c
@@ -359,6 +359,8 @@ struct xe_migrate *xe_migrate_init(struct xe_gt *gt)
 		xe_vm_close_and_put(vm);
 		return ERR_CAST(m->eng);
 	}
+	if (xe->info.supports_usm)
+		m->eng->entity->priority = DRM_SCHED_PRIORITY_KERNEL;
 
 	mutex_init(&m->job_mutex);
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-03-24 16:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-21  3:42 [Intel-xe] [PATCH] drm/xe: Fix potential deadlock handling page faults Matthew Brost
2023-03-21  3:44 ` [Intel-xe] ✓ CI.Patch_applied: success for drm/xe: Fix potential deadlock handling page faults (rev2) Patchwork
2023-03-21  3:46 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-03-21  3:49 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-03-21  4:01 ` [Intel-xe] ○ CI.BAT: info " Patchwork
2023-03-24 16:21 ` [Intel-xe] [PATCH] drm/xe: Fix potential deadlock handling page faults Maarten Lankhorst

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.