drm/amd/amdgpu: consider kernel job always not guilty
Subsystems (2)
PATCH v2 1/1 drm/amd/amdgpu: consider kernel job always not guilty
[Why]
Currently all timedout job will be considered to be guilty. In SRIOV multi-vf use case, the vf flr happens first and then job time out is found. There can be several jobs timeout during a very small time slice. And if the innocent sdma job time out is found before the real bad job, then the innocent sdma job will be set to guilty. This will lead to a page fault after resubmitting job.
[How]
If the job is a kernel job, we will always consider it not guilty
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3 -3
@@ -4410,7 +4410,7 @@ int amdgpu_device_pre_asic_reset(struct amdgpu_device *adev,amdgpu_fence_driver_force_completion (ring); } -if (job) +if (job && job->vm)drm_sched_increase_karma (&job->base); r =amdgpu_reset_prepare_hwcontext (adev, reset_context);
@@ -4874,7 +4874,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,DRM_INFO ("Bailing on TDR for s_job:%llx, hive: %llx as another already in progress" , job ? job->base.id :-1 , hive->hive_id);amdgpu_put_xgmi_hive (hive); -if (job) +if (job && job->vm)drm_sched_increase_karma (&job->base);return 0 ; }
@@ -4898,7 +4898,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev, job ? job->base.id : -1);/* even we skipped this reset, still need to set the job to guilty */ -if (job) +if (job && job->vm)drm_sched_increase_karma (&job->base); goto skip_recovery; }
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Am 21.07.21 um 04:05 schrieb Jingwen Chen:
Quoted 8 lines
[Why]
Currently all timedout job will be considered to be guilty. In SRIOV multi-vf use case, the vf flr happens first and then job time out is found. There can be several jobs timeout during a very small time slice. And if the innocent sdma job time out is found before the real bad job, then the innocent sdma job will be set to guilty. This will lead to a page fault after resubmitting job.
Quoted 4 lines
[How]
If the job is a kernel job, we will always consider it not guiltySigned-off-by Jingwen Chen <[email protected]>
Quoted 27 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2
-2@@ -4410,7 +4410,7 @@ int amdgpu_device_pre_asic_reset(struct amdgpu_device *adev,amdgpu_fence_driver_force_completion (ring); } -if (job) +if (job && job->vm)drm_sched_increase_karma (&job->base); r =amdgpu_reset_prepare_hwcontext (adev, reset_context);@@ -4874,7 +4874,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,DRM_INFO ("Bailing on TDR for s_job:%llx, hive: %llx as another already in progress" , job ? job->base.id :-1 , hive->hive_id);amdgpu_put_xgmi_hive (hive); -if (job) +if (job && job->vm)drm_sched_increase_karma (&job->base);return 0 ; }
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c int amdgpu_device_gpu_recover(struct amdgpu_device *adev, · line 4904
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-1@@ -4898,7 +4898,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev, job ? job->base.id : -1);/* even we skipped this reset, still need to set the job to guilty */ -if (job) +if (job && job->vm)drm_sched_increase_karma (&job->base); goto skip_recovery; }
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx