Skip to contentSkip to conversation

drm/amdgpu: skip coredump after job timeout in SRIOV

PATCH In review ZhenGuo Yin 2 participants 2 messages Sep 19, 2024

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

PATCH 1/1 drm/amdgpu: skip coredump after job timeout in SRIOV

VF FLR will be triggered by host driver before job timeout, hence the error status of GPU get cleared. Performing a coredump here is unnecessary.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +4 -1
index 381c886298bf..13a3604cf107 100644
@@ -107,8 +107,11 @@ static enum drm_gpu_sched_stat amdgpu_job_timedout(struct drm_sched_job *s_job)
 	/*
 	 * Do the coredump immediately after a job timeout to get a very
 	 * close dump/snapshot/representation of GPU's current error status
+	 * Skip it for SRIOV, since VF FLR will be triggered by host driver
+	 * before job timeout
 	 */
-	amdgpu_job_core_dump(adev, job);
+	if (!amdgpu_sriov_vf(adev))
+		amdgpu_job_core_dump(adev, job);
 
 	if (amdgpu_gpu_recovery &&
 	    amdgpu_ring_soft_recovery(ring, job->vmid, s_job->s_fence->parent)) {
Signature · 1 line
2.35.1
maintainer Acked-by on v1 1/1
#1 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

________________________________
From: Yin, ZhenGuo (Chris) <[email protected]>
Sent: Thursday, September 19, 2024 1:53 AM
To: [email protected] <[email protected]>
Cc: Deucher, Alexander <[email protected]>; Chen, Jingwen <[email protected]>; cao, lin <[email protected]>; Yin, ZhenGuo (Chris) <[email protected]>
Subject: [PATCH] drm/amdgpu: skip coredump after job timeout in SRIOV

VF FLR will be triggered by host driver before job timeout, hence the error status of GPU get cleared. Performing a coredump here is unnecessary.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +4 -1
index 381c886298bf..13a3604cf107 100644
@@ -107,8 +107,11 @@ static enum drm_gpu_sched_stat amdgpu_job_timedout(struct drm_sched_job *s_job)
         /*
          * Do the coredump immediately after a job timeout to get a very
          * close dump/snapshot/representation of GPU's current error status
+        * Skip it for SRIOV, since VF FLR will be triggered by host driver
+        * before job timeout
          */
-       amdgpu_job_core_dump(adev, job);
+       if (!amdgpu_sriov_vf(adev))
+               amdgpu_job_core_dump(adev, job);
 
         if (amdgpu_gpu_recovery &&
             amdgpu_ring_soft_recovery(ring, job->vmid, s_job->s_fence->parent)) {

--
2.35.1