drm/amdgpu: no job timeout setting on compute queues
Subsystems (2)
PATCH 1/1 drm/amdgpu: no job timeout setting on compute queues
Under some heavy computing test(dgemm) environment, it may takes the asic over 50+ seconds to finish the dispatched single job which will trigger the timeout. It's quite annoying although it does not seem to bring any real problems.
As a quick workround, we choose to not enfoce the timeout setting on compute queues.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +3 -1
@@ -435,7 +435,9 @@ int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring,if (ring->funcs->type !=AMDGPU_RING_TYPE_KIQ ) { r =drm_sched_init (&ring->sched, &amdgpu_sched_ops, num_hw_submission, amdgpu_job_hang_limit, -msecs_to_jiffies (amdgpu_lockup_timeout), ring->name); + (ring->funcs->type ==AMDGPU_RING_TYPE_COMPUTE ) ? +MAX_SCHEDULE_TIMEOUT :msecs_to_jiffies (amdgpu_lockup_timeout), + ring->name);if (r) {DRM_ERROR ("Failed to create scheduler on ring %s.\n" , ring->name);
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1521175952-21758-1-git-send-email-evan.quan-5C7GfCeVMHo@public.gmane.org
Since GPU reset is not enabled yet anyway, a timeout will just print a message, can we just change amdgpu_lockup_timeout to MAX_SCHEDULE_TIMEOUT until we enable GPU reset?
Alex
________________________________
From: Evan Quan <[email protected]>
Sent: Friday, March 16, 2018 12:52:32 AM
To: [email protected]
Cc: Deucher, Alexander; Quan, Evan
Subject: [PATCH] drm/amdgpu: no job timeout setting on compute queues
Under some heavy computing test(dgemm) environment, it may takes the asic over 50+ seconds to finish the dispatched single job which will trigger the timeout. It's quite annoying although it does not seem to bring any real problems.
As a quick workround, we choose to not enfoce the timeout setting on compute queues.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +3 -1
@@ -435,7 +435,9 @@ int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring,if (ring->funcs->type !=AMDGPU_RING_TYPE_KIQ ) { r =drm_sched_init (&ring->sched, &amdgpu_sched_ops, num_hw_submission, amdgpu_job_hang_limit, -msecs_to_jiffies (amdgpu_lockup_timeout), ring->name); + (ring->funcs->type ==AMDGPU_RING_TYPE_COMPUTE ) ? +MAX_SCHEDULE_TIMEOUT :msecs_to_jiffies (amdgpu_lockup_timeout), + ring->name);if (r) {DRM_ERROR ("Failed to create scheduler on ring %s.\n" , ring->name);
--
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): CY4PR12MB1653E72F547ABAECAC0A91A3F7D70-rpdhrqHFk06apTa93KjAaQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Quoted 3 lines · Alexander
Since GPU reset is not enabled yet anyway, a timeout will just print a message, can we just change
amdgpu_lockup_timeouttoMAX_SCHEDULE_TIMEOUTuntil we enable GPU reset?
Wouldn't that be rather surprising for somebody who sets amdgpu.gpu_recovery=1 ?
Signature · 6 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): bc7b30b9-7230-fdfe-4fd1-0f4dcd26a38d-otUistvHUpPR7s880joybQ@public.gmane.org
How about something like this:
/* Disable timeout when GPU reset is disabled to avoid confusing timeout messages in the kernel log */
If (amdgpu_gpu_recovery == 0 || amdgpu_gpu_recovery == -1)
amdgpu_lockup_timeout = MAX_SCHEDULE_TIMEOUT;
Alex
________________________________
From: Michel Dänzer <[email protected]>
Sent: Friday, March 16, 2018 12:25:03 PM
To: Deucher, Alexander; Quan, Evan
Cc: [email protected]
Subject: Re: [PATCH] drm/amdgpu: no job timeout setting on compute queues
Quoted 3 lines · Alexander
Since GPU reset is not enabled yet anyway, a timeout will just print a message, can we just change
amdgpu_lockup_timeouttoMAX_SCHEDULE_TIMEOUTuntil we enable GPU reset?
Wouldn't that be rather surprising for somebody who sets amdgpu.gpu_recovery=1 ?
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): CY4PR12MB16535036642155291C39F030F7D70-rpdhrqHFk06apTa93KjAaQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
That's fine for me. Will update the patch accordingly.
Regards,
Evan
From: Deucher, Alexander
Sent: Saturday, March 17, 2018 1:17 AM
To: Michel Dänzer <[email protected]>; Quan, Evan <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] drm/amdgpu: no job timeout setting on compute queues
How about something like this:
/* Disable timeout when GPU reset is disabled to avoid confusing timeout messages in the kernel log */
If (amdgpu_gpu_recovery == 0 || amdgpu_gpu_recovery == -1)
amdgpu_lockup_timeout = MAX_SCHEDULE_TIMEOUT;
Alex
________________________________
From: Michel Dänzer <[email protected]<mailto:[email protected]>>
Sent: Friday, March 16, 2018 12:25:03 PM
To: Deucher, Alexander; Quan, Evan
Cc: [email protected]<mailto:[email protected]>
Subject: Re: [PATCH] drm/amdgpu: no job timeout setting on compute queues
Quoted 3 lines · Alexander
Since GPU reset is not enabled yet anyway, a timeout will just print a message, can we just change
amdgpu_lockup_timeouttoMAX_SCHEDULE_TIMEOUTuntil we enable GPU reset?
Wouldn't that be rather surprising for somebody who sets amdgpu.gpu_recovery=1 ?
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): DM5PR1201MB2489E0DEA55F61E4314CE1EEE4D40-grEf7a3NxMAAZHT/xKzwlGrFom/aUZj6nBOFsp37pqbUKgpGm//BTAC/[email protected]
Please don’t do it for SR-IOV
/Monk
From: amd-gfx [mailto:[email protected]] On Behalf Of Quan, Evan
Sent: 2018年3月19日 9:47
To: Deucher, Alexander <[email protected]>; Michel Dänzer <[email protected]>
Cc: [email protected]
Subject: RE: [PATCH] drm/amdgpu: no job timeout setting on compute queues
That’s fine for me. Will update the patch accordingly.
Regards,
Evan
From: Deucher, Alexander
Sent: Saturday, March 17, 2018 1:17 AM
To: Michel Dänzer <[email protected]<mailto:[email protected]>>; Quan, Evan <[email protected]<mailto:[email protected]>>
Cc: [email protected]<mailto:[email protected]>
Subject: Re: [PATCH] drm/amdgpu: no job timeout setting on compute queues
How about something like this:
/* Disable timeout when GPU reset is disabled to avoid confusing timeout messages in the kernel log */
If (amdgpu_gpu_recovery == 0 || amdgpu_gpu_recovery == -1)
amdgpu_lockup_timeout = MAX_SCHEDULE_TIMEOUT;
Alex
________________________________
From: Michel Dänzer <[email protected]<mailto:[email protected]>>
Sent: Friday, March 16, 2018 12:25:03 PM
To: Deucher, Alexander; Quan, Evan
Cc: [email protected]<mailto:[email protected]>
Subject: Re: [PATCH] drm/amdgpu: no job timeout setting on compute queues
Quoted 3 lines · Alexander
Since GPU reset is not enabled yet anyway, a timeout will just print a message, can we just change
amdgpu_lockup_timeouttoMAX_SCHEDULE_TIMEOUTuntil we enable GPU reset?
Wouldn't that be rather surprising for somebody who sets amdgpu.gpu_recovery=1 ?
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Besides, if some compute shader takes time more them 50 seconds, you can just set lockuptime out to 50s Why change the logic in kmd side ?
I don’t think it’s a good idea to disable the time out message for compute ring, we have virtualization end-user Still want those message printed out
Can you do this way ?
In amdgpu_job_timeout, you can use DRM_WARN to replace DRM_ERROR for the job belongs to CPC engine ?
/Monk
From: amd-gfx [mailto:[email protected]] On Behalf Of Quan, Evan
Sent: 2018年3月19日 9:47
To: Deucher, Alexander <[email protected]>; Michel Dänzer <[email protected]>
Cc: [email protected]
Subject: RE: [PATCH] drm/amdgpu: no job timeout setting on compute queues
That’s fine for me. Will update the patch accordingly.
Regards,
Evan
From: Deucher, Alexander
Sent: Saturday, March 17, 2018 1:17 AM
To: Michel Dänzer <[email protected]<mailto:[email protected]>>; Quan, Evan <[email protected]<mailto:[email protected]>>
Cc: [email protected]<mailto:[email protected]>
Subject: Re: [PATCH] drm/amdgpu: no job timeout setting on compute queues
How about something like this:
/* Disable timeout when GPU reset is disabled to avoid confusing timeout messages in the kernel log */
If (amdgpu_gpu_recovery == 0 || amdgpu_gpu_recovery == -1)
amdgpu_lockup_timeout = MAX_SCHEDULE_TIMEOUT;
Alex
________________________________
From: Michel Dänzer <[email protected]<mailto:[email protected]>>
Sent: Friday, March 16, 2018 12:25:03 PM
To: Deucher, Alexander; Quan, Evan
Cc: [email protected]<mailto:[email protected]>
Subject: Re: [PATCH] drm/amdgpu: no job timeout setting on compute queues
Quoted 3 lines · Alexander
Since GPU reset is not enabled yet anyway, a timeout will just print a message, can we just change
amdgpu_lockup_timeouttoMAX_SCHEDULE_TIMEOUTuntil we enable GPU reset?
Wouldn't that be rather surprising for somebody who sets amdgpu.gpu_recovery=1 ?
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): BLUPR12MB0449F32EA2C9877B7C0BCA2984AD0-7LeqcoF/[email protected]
That's fine with me too. Or make them DRM_INFO.
Alex
________________________________
From: Liu, Monk
Sent: Monday, March 26, 2018 8:55:51 AM
To: Quan, Evan; Deucher, Alexander; Michel Dänzer
Cc: [email protected]
Subject: RE: [PATCH] drm/amdgpu: no job timeout setting on compute queues
Besides, if some compute shader takes time more them 50 seconds, you can just set lockuptime out to 50s
Why change the logic in kmd side ?
I don’t think it’s a good idea to disable the time out message for compute ring, we have virtualization end-user
Still want those message printed out
Can you do this way ?
In amdgpu_job_timeout, you can use DRM_WARN to replace DRM_ERROR for the job belongs to CPC engine ?
/Monk
From: amd-gfx [mailto:[email protected]] On Behalf Of Quan, Evan
Sent: 2018年3月19日 9:47
To: Deucher, Alexander <[email protected]>; Michel Dänzer <[email protected]>
Cc: [email protected]
Subject: RE: [PATCH] drm/amdgpu: no job timeout setting on compute queues
That’s fine for me. Will update the patch accordingly.
Regards,
Evan
From: Deucher, Alexander
Sent: Saturday, March 17, 2018 1:17 AM
To: Michel Dänzer <[email protected]<mailto:[email protected]>>; Quan, Evan <[email protected]<mailto:[email protected]>>
Cc: [email protected]<mailto:[email protected]>
Subject: Re: [PATCH] drm/amdgpu: no job timeout setting on compute queues
How about something like this:
/* Disable timeout when GPU reset is disabled to avoid confusing timeout messages in the kernel log */
If (amdgpu_gpu_recovery == 0 || amdgpu_gpu_recovery == -1)
amdgpu_lockup_timeout = MAX_SCHEDULE_TIMEOUT;
Alex
________________________________
From: Michel Dänzer <[email protected]<mailto:[email protected]>>
Sent: Friday, March 16, 2018 12:25:03 PM
To: Deucher, Alexander; Quan, Evan
Cc: [email protected]<mailto:[email protected]>
Subject: Re: [PATCH] drm/amdgpu: no job timeout setting on compute queues
Quoted 3 lines · Alexander
Since GPU reset is not enabled yet anyway, a timeout will just print a message, can we just change
amdgpu_lockup_timeouttoMAX_SCHEDULE_TIMEOUTuntil we enable GPU reset?
Wouldn't that be rather surprising for somebody who sets amdgpu.gpu_recovery=1 ?
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): BN6PR12MB18098A39176CC8C063A9BF7AF7AD0-/b2+HYfkarSEx6ez0IUAagdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Hi Monk,
That’s a fix reached after a long discussion(I believe you were in that mail thread). 50s is for the dgemm test. We are not sure whether it’s enough for other compute use case. If virtualization still needs these messages, I believe we can list that as an exception
- (ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE) ? + /* for non-sriov case, no timeout enforce on compute ring */ + ((ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE) && !amdgpu_sriov_vf(ring->adev)) ?
Regards,
Evan
From: Deucher, Alexander
Sent: Monday, March 26, 2018 11:20 PM
To: Liu, Monk <[email protected]>; Quan, Evan <[email protected]>; Michel Dänzer <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] drm/amdgpu: no job timeout setting on compute queues
That's fine with me too. Or make them DRM_INFO.
Alex
________________________________
From: Liu, Monk
Sent: Monday, March 26, 2018 8:55:51 AM
To: Quan, Evan; Deucher, Alexander; Michel Dänzer
Cc: [email protected]<mailto:[email protected]>
Subject: RE: [PATCH] drm/amdgpu: no job timeout setting on compute queues
Besides, if some compute shader takes time more them 50 seconds, you can just set lockuptime out to 50s
Why change the logic in kmd side ?
I don’t think it’s a good idea to disable the time out message for compute ring, we have virtualization end-user
Still want those message printed out
Can you do this way ?
In amdgpu_job_timeout, you can use DRM_WARN to replace DRM_ERROR for the job belongs to CPC engine ?
/Monk
From: amd-gfx [mailto:[email protected]] On Behalf Of Quan, Evan
Sent: 2018年3月19日 9:47
To: Deucher, Alexander <[email protected]<mailto:[email protected]>>; Michel Dänzer <[email protected]<mailto:[email protected]>>
Cc: [email protected]<mailto:[email protected]>
Subject: RE: [PATCH] drm/amdgpu: no job timeout setting on compute queues
That’s fine for me. Will update the patch accordingly.
Regards,
Evan
From: Deucher, Alexander
Sent: Saturday, March 17, 2018 1:17 AM
To: Michel Dänzer <[email protected]<mailto:[email protected]>>; Quan, Evan <[email protected]<mailto:[email protected]>>
Cc: [email protected]<mailto:[email protected]>
Subject: Re: [PATCH] drm/amdgpu: no job timeout setting on compute queues
How about something like this:
/* Disable timeout when GPU reset is disabled to avoid confusing timeout messages in the kernel log */
If (amdgpu_gpu_recovery == 0 || amdgpu_gpu_recovery == -1)
amdgpu_lockup_timeout = MAX_SCHEDULE_TIMEOUT;
Alex
________________________________
From: Michel Dänzer <[email protected]<mailto:[email protected]>>
Sent: Friday, March 16, 2018 12:25:03 PM
To: Deucher, Alexander; Quan, Evan
Cc: [email protected]<mailto:[email protected]>
Subject: Re: [PATCH] drm/amdgpu: no job timeout setting on compute queues
Quoted 3 lines · Alexander
Since GPU reset is not enabled yet anyway, a timeout will just print a message, can we just change
amdgpu_lockup_timeouttoMAX_SCHEDULE_TIMEOUTuntil we enable GPU reset?
Wouldn't that be rather surprising for somebody who sets amdgpu.gpu_recovery=1 ?
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): DM5PR1201MB248935C8971B1D451391F294E4AC0-grEf7a3NxMAAZHT/xKzwlGrFom/aUZj6nBOFsp37pqbUKgpGm//BTAC/[email protected]
Ok, fine by me
/Monk
From: Quan, Evan
Sent: 2018年3月27日 9:34
To: Deucher, Alexander <[email protected]>; Liu, Monk <[email protected]>; Michel Dänzer <[email protected]>
Cc: [email protected]; Koenig, Christian <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: no job timeout setting on compute queues
Hi Monk,
That’s a fix reached after a long discussion(I believe you were in that mail thread). 50s is for the dgemm test. We are not sure whether it’s enough for other compute use case. If virtualization still needs these messages, I believe we can list that as an exception
- (ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE) ? + /* for non-sriov case, no timeout enforce on compute ring */ + ((ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE) && !amdgpu_sriov_vf(ring->adev)) ?
Regards,
Evan
From: Deucher, Alexander
Sent: Monday, March 26, 2018 11:20 PM
To: Liu, Monk <[email protected]<mailto:[email protected]>>; Quan, Evan <[email protected]<mailto:[email protected]>>; Michel Dänzer <[email protected]<mailto:[email protected]>>
Cc: [email protected]<mailto:[email protected]>
Subject: Re: [PATCH] drm/amdgpu: no job timeout setting on compute queues
That's fine with me too. Or make them DRM_INFO.
Alex
________________________________
From: Liu, Monk
Sent: Monday, March 26, 2018 8:55:51 AM
To: Quan, Evan; Deucher, Alexander; Michel Dänzer
Cc: [email protected]<mailto:[email protected]>
Subject: RE: [PATCH] drm/amdgpu: no job timeout setting on compute queues
Besides, if some compute shader takes time more them 50 seconds, you can just set lockuptime out to 50s
Why change the logic in kmd side ?
I don’t think it’s a good idea to disable the time out message for compute ring, we have virtualization end-user
Still want those message printed out
Can you do this way ?
In amdgpu_job_timeout, you can use DRM_WARN to replace DRM_ERROR for the job belongs to CPC engine ?
/Monk
From: amd-gfx [mailto:[email protected]] On Behalf Of Quan, Evan
Sent: 2018年3月19日 9:47
To: Deucher, Alexander <[email protected]<mailto:[email protected]>>; Michel Dänzer <[email protected]<mailto:[email protected]>>
Cc: [email protected]<mailto:[email protected]>
Subject: RE: [PATCH] drm/amdgpu: no job timeout setting on compute queues
That’s fine for me. Will update the patch accordingly.
Regards,
Evan
From: Deucher, Alexander
Sent: Saturday, March 17, 2018 1:17 AM
To: Michel Dänzer <[email protected]<mailto:[email protected]>>; Quan, Evan <[email protected]<mailto:[email protected]>>
Cc: [email protected]<mailto:[email protected]>
Subject: Re: [PATCH] drm/amdgpu: no job timeout setting on compute queues
How about something like this:
/* Disable timeout when GPU reset is disabled to avoid confusing timeout messages in the kernel log */
If (amdgpu_gpu_recovery == 0 || amdgpu_gpu_recovery == -1)
amdgpu_lockup_timeout = MAX_SCHEDULE_TIMEOUT;
Alex
________________________________
From: Michel Dänzer <[email protected]<mailto:[email protected]>>
Sent: Friday, March 16, 2018 12:25:03 PM
To: Deucher, Alexander; Quan, Evan
Cc: [email protected]<mailto:[email protected]>
Subject: Re: [PATCH] drm/amdgpu: no job timeout setting on compute queues
Quoted 3 lines · Alexander
Since GPU reset is not enabled yet anyway, a timeout will just print a message, can we just change
amdgpu_lockup_timeouttoMAX_SCHEDULE_TIMEOUTuntil we enable GPU reset?
Wouldn't that be rather surprising for somebody who sets amdgpu.gpu_recovery=1 ?
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx