drm/amdgpu: add ring reset messages
Subsystems (2)
Alex Deucher
maintainerPATCH 1/1 drm/amdgpu: add ring reset messages
Add messages to make it clear when a per ring reset happens. This is helpful for debugging and aligns with other reset methods.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +3 -0
@@ -137,6 +137,7 @@ static enum drm_gpu_sched_stat amdgpu_job_timedout(struct drm_sched_job *s_job)/* attempt a per ring reset */ if (amdgpu_gpu_recovery && ring->funcs->reset) { +dev_err (adev->dev,"Starting %s ring reset\n" , s_job->sched->name);/* stop the scheduler, but don't mess with the * bad job yet because if ring reset fails * we'll fall back to full GPU reset.
@@ -150,8 +151,10 @@ static enum drm_gpu_sched_stat amdgpu_job_timedout(struct drm_sched_job *s_job)amdgpu_fence_driver_force_completion (ring);if (amdgpu_ring_sched_ready (ring))drm_sched_start (&ring->sched); +dev_err (adev->dev,"Ring reset success\n" ); goto exit; } +dev_err (adev->dev,"Ring reset failure\n" ); }if (amdgpu_device_should_recover_gpu (ring->adev)) {
Signature · 1 line
2.46.2
Ping?
Quoted 36 lines · Alex Deucher
Add messages to make it clear when a per ring reset happens. This is helpful for debugging and aligns with other reset methods.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +3
-1@@ -137,6 +137,7 @@ static enum drm_gpu_sched_stat amdgpu_job_timedout(struct drm_sched_job *s_job)/* attempt a per ring reset */ if (amdgpu_gpu_recovery && ring->funcs->reset) { +dev_err (adev->dev,"Starting %s ring reset\n" , s_job->sched->name);/* stop the scheduler, but don't mess with the * bad job yet because if ring reset fails * we'll fall back to full GPU reset. @@ -150,8 +151,10 @@ static enum drm_gpu_sched_stat amdgpu_job_timedout(struct drm_sched_job *s_job)amdgpu_fence_driver_force_completion (ring);if (amdgpu_ring_sched_ready (ring))drm_sched_start (&ring->sched); +dev_err (adev->dev,"Ring reset success\n" ); goto exit; } +dev_err (adev->dev,"Ring reset failure\n" ); }if (amdgpu_device_should_recover_gpu (ring->adev)) { --2.46.2
Ping?
Quoted 40 lines · Alex Deucher
Ping?
Quoted 36 lines · Alex Deucher
Add messages to make it clear when a per ring reset happens. This is helpful for debugging and aligns with other reset methods.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +3
-1@@ -137,6 +137,7 @@ static enum drm_gpu_sched_stat amdgpu_job_timedout(struct drm_sched_job *s_job)/* attempt a per ring reset */ if (amdgpu_gpu_recovery && ring->funcs->reset) { +dev_err (adev->dev,"Starting %s ring reset\n" , s_job->sched->name);/* stop the scheduler, but don't mess with the * bad job yet because if ring reset fails * we'll fall back to full GPU reset. @@ -150,8 +151,10 @@ static enum drm_gpu_sched_stat amdgpu_job_timedout(struct drm_sched_job *s_job)amdgpu_fence_driver_force_completion (ring);if (amdgpu_ring_sched_ready (ring))drm_sched_start (&ring->sched); +dev_err (adev->dev,"Ring reset success\n" ); goto exit; } +dev_err (adev->dev,"Ring reset failure\n" ); }if (amdgpu_device_should_recover_gpu (ring->adev)) { --2.46.2
Russell, Kent
Reviewed-by[Public]
Seems simple enough to me
Quoted 55 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Monday, October 28, 2024 10:42 AM
To: Deucher, Alexander <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] drm/amdgpu: add ring reset messagesPing?
Quoted 4 lines · Alex Deucher
Ping?
On Tue, Oct 15, 2024 at 2:28 PM Alex Deucher <[email protected]>
Quoted 11 lines · wrote:
Review
Quoted 11 lines
Add messages to make it clear when a per ring reset happens. This is helpful for debugging and aligns with other reset methods.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 3 +++ 1 file changed, 3 insertions(+)(quoted diff) +0
-0
b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.cQuoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c static enum drm_gpu_sched_stat
Quoted 4 lines
index
102742f1faa2..2d60552a13ac100644drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +0
-0@@ -137,6 +137,7 @@ static enum drm_gpu_sched_stat
amdgpu_job_timedout(struct drm_sched_job *s_job)Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c static enum drm_gpu_sched_stat
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +1
-0/* attempt a per ring reset */ if (amdgpu_gpu_recovery && ring->funcs->reset) { +dev_err (adev->dev,"Starting %s ring reset\n" , s_job->sched->name);/* stop the scheduler, but don't mess with the * bad job yet because if ring reset fails * we'll fall back to full GPU reset. @@ -150,8 +151,10 @@ static enum drm_gpu_sched_stat
amdgpu_job_timedout(struct drm_sched_job *s_job)Quoted 13 lines
Quoted 13 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +2
-1amdgpu_fence_driver_force_completion (ring);if (amdgpu_ring_sched_ready (ring))drm_sched_start (&ring->sched); +dev_err (adev->dev,"Ring reset success\n" ); goto exit; } +dev_err (adev->dev,"Ring reset failure\n" ); }if (amdgpu_device_should_recover_gpu (ring->adev)) { --2.46.2
Quoted 17 lines · Alex Deucher
Ping?
Quoted 14 lines · Alex Deucher
Ping?
Quoted 10 lines · Alex Deucher
Add messages to make it clear when a per ring reset happens. This is helpful for debugging and aligns with other reset methods.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 3 +++ 1 file changed, 3 insertions(+)
Quoted 9 lines
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c static enum drm_gpu_sched_stat amdgpu_job_timedout(struct drm_sched_job *s_job) · line 140
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +1
-0@@ -137,6 +137,7 @@ static enum drm_gpu_sched_stat amdgpu_job_timedout(struct drm_sched_job *s_job)/* attempt a per ring reset */ if (amdgpu_gpu_recovery && ring->funcs->reset) { +dev_err (adev->dev,"Starting %s ring reset\n" , s_job->sched->name);
Is dev_err intentional or dev_info is good enough? Also, suggest to add ring name to fail/pass messages.
Thanks,
Lijo
Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +2
-1/* stop the scheduler, but don't mess with the * bad job yet because if ring reset fails * we'll fall back to full GPU reset. @@ -150,8 +151,10 @@ static enum drm_gpu_sched_stat amdgpu_job_timedout(struct drm_sched_job *s_job)amdgpu_fence_driver_force_completion (ring);if (amdgpu_ring_sched_ready (ring))drm_sched_start (&ring->sched); + dev_err(adev->dev, "Ring reset success\n");>>> goto exit; } +dev_err (adev->dev,"Ring reset failure\n" ); }if (amdgpu_device_should_recover_gpu (ring->adev)) { --2.46.2
Quoted 21 lines · Lijo
Quoted 17 lines · Alex Deucher
Ping?
Quoted 14 lines · Alex Deucher
Ping?
Quoted 10 lines · Alex Deucher
Add messages to make it clear when a per ring reset happens. This is helpful for debugging and aligns with other reset methods.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 3 +++ 1 file changed, 3 insertions(+)
Quoted 12 lines
Quoted 9 lines
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c static enum drm_gpu_sched_stat amdgpu_job_timedout(struct drm_sched_job *s_job) · line 140
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +1
-0@@ -137,6 +137,7 @@ static enum drm_gpu_sched_stat amdgpu_job_timedout(struct drm_sched_job *s_job)/* attempt a per ring reset */ if (amdgpu_gpu_recovery && ring->funcs->reset) { +dev_err (adev->dev,"Starting %s ring reset\n" , s_job->sched->name);Is
dev_errintentional ordev_infois good enough? Also, suggest to add ring name to fail/pass messages.
I was being consistent with the other messages from this function. They are all dev_err. Will add the ring name.
Thanks,
Alex
Quoted 20 lines
Thanks,
LijoQuoted 16 lines
Quoted 16 lines
Quoted 16 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +2
-1/* stop the scheduler, but don't mess with the * bad job yet because if ring reset fails * we'll fall back to full GPU reset. @@ -150,8 +151,10 @@ static enum drm_gpu_sched_stat amdgpu_job_timedout(struct drm_sched_job *s_job)amdgpu_fence_driver_force_completion (ring);if (amdgpu_ring_sched_ready (ring))drm_sched_start (&ring->sched); + dev_err(adev->dev, "Ring reset success\n");>>> goto exit; } +dev_err (adev->dev,"Ring reset failure\n" ); }if (amdgpu_device_should_recover_gpu (ring->adev)) { --2.46.2