Skip to contentSkip to conversation

drm/amdgpu: print process info when job timeout

PATCH In review Trigger Huang 2 participants 2 messages Dec 18, 2018 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: print process info when job timeout

When a job is timeout, try to print the related process information for debugging

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +4 -0
index e0af44f..915310d 100644
@@ -32,6 +32,7 @@ static void amdgpu_job_timedout(struct drm_sched_job *s_job)
 {
 	struct amdgpu_ring *ring = to_amdgpu_ring(s_job->sched);
 	struct amdgpu_job *job = to_amdgpu_job(s_job);
+	struct amdgpu_task_info ti = { 0 };
 
 	if (amdgpu_ring_soft_recovery(ring, job->vmid, s_job->s_fence->parent)) {
 		DRM_ERROR("ring %s timeout, but soft recovered\n",
@@ -39,9 +40,12 @@ static void amdgpu_job_timedout(struct drm_sched_job *s_job)
 		return;
 	}
 
+	amdgpu_vm_get_task_info(ring->adev, job->pasid, &ti);
 	DRM_ERROR("ring %s timeout, signaled seq=%u, emitted seq=%u\n",
 		  job->base.sched->name, atomic_read(&ring->fence_drv.last_seq),
 		  ring->fence_drv.sync_seq);
+	DRM_ERROR("Process information: process %s pid %d thread %s pid %d\n",
+		  ti.process_name, ti.tgid, ti.task_name, ti.pid);
 
 	if (amdgpu_device_should_recover_gpu(ring->adev))
 		amdgpu_device_gpu_recover(ring->adev, job);
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#2 lore raw
In reply to a message not in the archive

Am 18.12.18 um 02:42 schrieb Trigger Huang:

Quoted 13 lines

When a job is timeout, try to print the related process information for debugging

---
  drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 4 ++++
  1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +0 -0
index e0af44f..915310d 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_job.c static void amdgpu_job_timedout(struct drm_sched_job *s_job) · line 35

Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +1 -0
@@ -32,6 +32,7 @@ static void amdgpu_job_timedout(struct drm_sched_job *s_job)
  {
  	struct amdgpu_ring *ring = to_amdgpu_ring(s_job->sched);
  	struct amdgpu_job *job = to_amdgpu_job(s_job);
+	struct amdgpu_task_info ti = { 0 };

Please use memset for the initialization.

Apart from that the patch is Reviewed-by: Christian König <[email protected]>.

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +0 -0
  	if (amdgpu_ring_soft_recovery(ring, job->vmid, s_job->s_fence->parent)) {
  		DRM_ERROR("ring %s timeout, but soft recovered\n",
@@ -39,9 +40,12 @@ static void amdgpu_job_timedout(struct drm_sched_job *s_job)
  		return;
  	}

drivers/gpu/drm/amd/amdgpu/amdgpu_job.c static void amdgpu_job_timedout(struct drm_sched_job *s_job) · line 51

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +3 -0
 
+	amdgpu_vm_get_task_info(ring->adev, job->pasid, &ti);
  	DRM_ERROR("ring %s timeout, signaled seq=%u, emitted seq=%u\n",
  		  job->base.sched->name, atomic_read(&ring->fence_drv.last_seq),
  		  ring->fence_drv.sync_seq);
+	DRM_ERROR("Process information: process %s pid %d thread %s pid %d\n",
+		  ti.process_name, ti.tgid, ti.task_name, ti.pid);
 
  	if (amdgpu_device_should_recover_gpu(ring->adev))
  		amdgpu_device_gpu_recover(ring->adev, job);

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx