Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe: Unlink client during vm close
@ 2024-07-18 13:17 Tejas Upadhyay
  2024-07-18 13:22 ` ✓ CI.Patch_applied: success for " Patchwork
                   ` (8 more replies)
  0 siblings, 9 replies; 15+ messages in thread
From: Tejas Upadhyay @ 2024-07-18 13:17 UTC (permalink / raw)
  To: intel-xe; +Cc: Tejas Upadhyay

We have async call which does not know if client
unlinked from vm by the time it is accessed. Set
client unlink early during xe_vm_close() so that
async API do not touch closed client info.

Also, debugs related to job timeout is not useful
when its "no process" or client already unlinked.

Fixes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2273
Signed-off-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
---
 drivers/gpu/drm/xe/xe_guc_submit.c | 7 ++++---
 drivers/gpu/drm/xe/xe_vm.c         | 1 +
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
index 860405527115..1de141cb84c6 100644
--- a/drivers/gpu/drm/xe/xe_guc_submit.c
+++ b/drivers/gpu/drm/xe/xe_guc_submit.c
@@ -1166,10 +1166,11 @@ guc_exec_queue_timedout_job(struct drm_sched_job *drm_job)
 			process_name = task->comm;
 			pid = task->pid;
 		}
+		xe_gt_notice(guc_to_gt(guc), "Timedout job: seqno=%u, lrc_seqno=%u, guc_id=%d, flags=0x%lx in %s [%d]",
+			     xe_sched_job_seqno(job), xe_sched_job_lrc_seqno(job),
+			     q->guc->id, q->flags, process_name, pid);
 	}
-	xe_gt_notice(guc_to_gt(guc), "Timedout job: seqno=%u, lrc_seqno=%u, guc_id=%d, flags=0x%lx in %s [%d]",
-		     xe_sched_job_seqno(job), xe_sched_job_lrc_seqno(job),
-		     q->guc->id, q->flags, process_name, pid);
+
 	if (task)
 		put_task_struct(task);
 
diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
index cf3aea5d8cdc..660b20e0e207 100644
--- a/drivers/gpu/drm/xe/xe_vm.c
+++ b/drivers/gpu/drm/xe/xe_vm.c
@@ -1537,6 +1537,7 @@ static void xe_vm_close(struct xe_vm *vm)
 {
 	down_write(&vm->lock);
 	vm->size = 0;
+	vm->xef = NULL;
 	up_write(&vm->lock);
 }
 
-- 
2.25.1


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

end of thread, other threads:[~2024-07-19 16:29 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-18 13:17 [PATCH] drm/xe: Unlink client during vm close Tejas Upadhyay
2024-07-18 13:22 ` ✓ CI.Patch_applied: success for " Patchwork
2024-07-18 13:22 ` ✗ CI.checkpatch: warning " Patchwork
2024-07-18 13:23 ` ✓ CI.KUnit: success " Patchwork
2024-07-18 13:35 ` ✓ CI.Build: " Patchwork
2024-07-18 13:38 ` ✓ CI.Hooks: " Patchwork
2024-07-18 13:39 ` ✓ CI.checksparse: " Patchwork
2024-07-18 14:00 ` ✓ CI.BAT: " Patchwork
2024-07-18 15:58 ` [PATCH] " Matthew Brost
2024-07-19  5:08   ` Upadhyay, Tejas
2024-07-19  6:52     ` Matthew Brost
2024-07-19  7:08       ` Matthew Brost
2024-07-19 10:14       ` Upadhyay, Tejas
2024-07-19 16:29         ` Lucas De Marchi
2024-07-18 18:39 ` ✗ CI.FULL: failure for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox