drm/amdgpu: disable job timeout on GPU reset disabled
Subsystems (2)
PATCH 1/1 drm/amdgpu: disable job timeout on GPU reset disabled
Since under some heavy computing environment(dgemm test), it takes the asic over 10+ seconds to finish the dispatched single job which will trigger the timeout. It's quite confusing although it does not seem to bring any real problems.
As a quick workround, we choose to disable timeout when GPU reset is disabled.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +7 -0
@@ -861,6 +861,13 @@ static void amdgpu_device_check_arguments(struct amdgpu_device *adev) amdgpu_lockup_timeout =10000 ; } +/* +* 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 =INT_MAX ; + adev->firmware.load_type =amdgpu_ucode_get_load_type (adev, amdgpu_fw_load_type); }
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): 1521439692-14823-1-git-send-email-evan.quan-5C7GfCeVMHo@public.gmane.org
Hi Alex,
INT_MAX is used instead of MAX_SCHEDULE_TIMEOUT(which we discussed in another mail thread) since the amdgpu_lockup_timeout is with data type int. Using MAX_SCHEDULE_TIMEOUT(data type:long) will get compile warnings.
Regards,
Evan
-----Original Message-----
From: Evan Quan [mailto:[email protected]]
Sent: Monday, March 19, 2018 2:08 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Quan, Evan <[email protected]>
Subject: [PATCH] drm/amdgpu: disable job timeout on GPU reset disabled
Since under some heavy computing environment(dgemm test), it takes the asic over 10+ seconds to finish the dispatched single job which will trigger the timeout. It's quite confusing although it does not seem to bring any real problems. As a quick workround, we choose to disable timeout when GPU reset is disabled.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +7 -1
@@ -861,6 +861,13 @@ static void amdgpu_device_check_arguments(struct amdgpu_device *adev) amdgpu_lockup_timeout =10000 ; } +/* +* 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 =INT_MAX ; + adev->firmware.load_type =amdgpu_ucode_get_load_type (adev, amdgpu_fw_load_type); } --
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Christian König
NAKAm 19.03.2018 um 07:08 schrieb Evan Quan:
Quoted 6 lines
Since under some heavy computing environment(dgemm test), it takes the asic over 10+ seconds to finish the dispatched single job which will trigger the timeout. It's quite confusing although it does not seem to bring any real problems.
As a quick workround, we choose to disable timeout when GPU reset is disabled.
NAK, I enabled those warning intentionally even when the GPU recovery is disabled to have a hint in the logs what goes wrong.
Please only increase the timeout for the compute queue and/or add a separate timeout for them.
Regards,
Christian.
Quoted 15 lines
Change-Id I3a95d856ba4993094dc7b6269649e470c5b053d2Signed-off-by Evan Quan <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-0@@ -861,6 +861,13 @@ static void amdgpu_device_check_arguments(struct amdgpu_device *adev) amdgpu_lockup_timeout =10000 ; }
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void amdgpu_device_check_arguments(struct amdgpu_device *adev) · line 873
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +7
-0+/* +* 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 =INT_MAX ; + adev->firmware.load_type =amdgpu_ucode_get_load_type (adev, amdgpu_fw_load_type); }
_______________________________________________
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): d7a88e66-6533-9c12-c36c-9b3ea569e354-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Hi Christian,
The messages prompted on timeout are Errors not just Warnings although we did not see any real problem(for the dgemm special case). That's why we say it confusing. And i suppose you want a fix like my previous patch(see attachment).
Regards,
Evan
Quoted 43 lines
-----Original Message-----
From: Christian König [mailto:[email protected]]
Sent: Monday, March 19, 2018 5:42 PM
To: Quan, Evan <[email protected]>; [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: disable job timeout on GPU reset disabledAm 19.03.2018 um 07:08 schrieb Evan Quan:
Quoted 6 lines
Since under some heavy computing environment(dgemm test), it takes the asic over 10+ seconds to finish the dispatched single job which will trigger the timeout. It's quite confusing although it does not seem to bring any real problems.
As a quick workround, we choose to disable timeout when GPU reset is disabled.NAK, I enabled those warning intentionally even when the GPU recovery is disabled to have a hint in the logs what goes wrong.
Please only increase the timeout for the compute queue and/or add a separate timeout for them.
Regards,
Christian.drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void
Quoted 13 lines
Change-Id I3a95d856ba4993094dc7b6269649e470c5b053d2Signed-off-by Evan Quan <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-0@@ -861,6 +861,13 @@ static void
amdgpu_device_check_arguments(struct amdgpu_device *adev)Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-0amdgpu_lockup_timeout =10000 ; }
Quoted 11 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void · line 871
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +7
-0+/* +* 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 =INT_MAX ; + adev->firmware.load_type = amdgpu_ucode_get_load_type(adev,
amdgpu_fw_load_type);Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-0}
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): DM5PR1201MB248999A09FAAC36F90204EF9E4AB0-grEf7a3NxMAAZHT/xKzwlGrFom/aUZj6nBOFsp37pqbUKgpGm//BTAC/[email protected]
Hi Evan,
that one is perfect if you ask me. Just reading up on the history of that patch, Alex what was your concern with that?
Regarding printing this as error, that's a really good point as well. We should probably reduce it to a warning or even info severity.
Regards,
Christian.
Am 20.03.2018 um 03:11 schrieb Quan, Evan:
Quoted 59 lines
Hi Christian,
The messages prompted on timeout are Errors not just Warnings although we did not see any real problem(for the dgemm special case). That's why we say it confusing. And i suppose you want a fix like my previous patch(see attachment).
Regards,
EvanQuoted 52 lines
-----Original Message-----
From: Christian König [mailto:[email protected]]
Sent: Monday, March 19, 2018 5:42 PM
To: Quan, Evan <[email protected]>; [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: disable job timeout on GPU reset disabledAm 19.03.2018 um 07:08 schrieb Evan Quan:
Quoted 6 lines
Since under some heavy computing environment(dgemm test), it takes the asic over 10+ seconds to finish the dispatched single job which will trigger the timeout. It's quite confusing although it does not seem to bring any real problems.
As a quick workround, we choose to disable timeout when GPU reset is disabled.NAK, I enabled those warning intentionally even when the GPU recovery is disabled to have a hint in the logs what goes wrong.
Please only increase the timeout for the compute queue and/or add a separate timeout for them.
Regards,
Christian.drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void
Quoted 12 lines
Change-Id I3a95d856ba4993094dc7b6269649e470c5b053d2Signed-off-by Evan Quan <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-0@@ -861,6 +861,13 @@ static void
amdgpu_device_check_arguments(struct amdgpu_device *adev)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void · line 871
Quoted 11 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +7
-0amdgpu_lockup_timeout =10000 ; } +/* +* 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 =INT_MAX ; + adev->firmware.load_type = amdgpu_ucode_get_load_type(adev,
amdgpu_fw_load_type);Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-0}
_______________________________________________
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): fffd20df-cbcb-51ae-7de2-915804fce17f-5C7GfCeVMHo@public.gmane.org
Deucher, Alexander
Acked-byMy concern was that compute will always have the timeout disabled with no way to override it even if you enable GPU reset. I guess we can address that down the road.
________________________________
From: Koenig, Christian
Sent: Tuesday, March 20, 2018 6:14:29 AM
To: Quan, Evan; [email protected]
Cc: Deucher, Alexander
Subject: Re: [PATCH] drm/amdgpu: disable job timeout on GPU reset disabled
Hi Evan,
that one is perfect if you ask me. Just reading up on the history of that patch, Alex what was your concern with that?
Regarding printing this as error, that's a really good point as well. We should probably reduce it to a warning or even info severity.
Regards,
Christian.
Am 20.03.2018 um 03:11 schrieb Quan, Evan:
Quoted 59 lines
Hi Christian,
The messages prompted on timeout are Errors not just Warnings although we did not see any real problem(for the dgemm special case). That's why we say it confusing. And i suppose you want a fix like my previous patch(see attachment).
Regards,
EvanQuoted 52 lines
-----Original Message-----
From: Christian König [mailto:[email protected]]
Sent: Monday, March 19, 2018 5:42 PM
To: Quan, Evan <[email protected]>; [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: disable job timeout on GPU reset
disabledAm 19.03.2018 um 07:08 schrieb Evan Quan:
Quoted 6 lines
Since under some heavy computing environment(dgemm test), it takes the asic over 10+ seconds to finish the dispatched single job which will trigger the timeout. It's quite confusing although it does not seem to bring any real problems.
As a quick workround, we choose to disable timeout when GPU reset is disabled.NAK, I enabled those warning intentionally even when the GPU recovery is disabled to have a hint in the logs what goes wrong.
Please only increase the timeout for the compute queue and/or add a separate timeout for them.
Regards,
Christian.drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void
Quoted 12 lines
Change-Id I3a95d856ba4993094dc7b6269649e470c5b053d2Signed-off-by Evan Quan <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-0@@ -861,6 +861,13 @@ static void
amdgpu_device_check_arguments(struct amdgpu_device *adev)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void · line 871
Quoted 11 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +7
-0amdgpu_lockup_timeout =10000 ; } +/* +* 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 =INT_MAX ; + adev->firmware.load_type = amdgpu_ucode_get_load_type(adev,
amdgpu_fw_load_type);Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-0}
_______________________________________________
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): DM5PR12MB1820FEE50DE4EBD1E44B676BF7AB0-2J9CzHegvk8qWyLXlBb1HgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
That's a good point as well, maybe we should have separate timeouts for gfx and compute?
Something like 5 seconds for gfx and 1 minute (or even longer) for compute?
Anyway I agree that we can worry about that later on, patch is Reviewed-by: Christian König <[email protected]> for now.
Regards,
Christian.
Am 20.03.2018 um 15:16 schrieb Deucher, Alexander:
Quoted 41 lines
My concern was that compute will always have the timeout disabled with no way to override it even if you enable GPU reset. I guess we can address that down the road.
Acked-by Alex Deucher <[email protected]>------------------------------------------------------------------------
*From:* Koenig, Christian
*Sent:* Tuesday, March 20, 2018 6:14:29 AM
*To:* Quan, Evan; [email protected] *Cc:* Deucher, Alexander
*Subject:* Re: [PATCH] drm/amdgpu: disable job timeout on GPU reset disabled Hi Evan,that one is perfect if you ask me. Just reading up on the history of that patch, Alex what was your concern with that?
Regarding printing this as error, that's a really good point as well. We should probably reduce it to a warning or even info severity.
Regards,
Christian.Am 20.03.2018 um 03:11 schrieb Quan, Evan:
Quoted 3 lines
Hi Christian,
The messages prompted on timeout are Errors not just Warnings
although we did not see any real problem(for the dgemm special case). That's why we say it confusing.
Quoted 13 lines
And i suppose you want a fix like my previous patch(see attachment).
Regards,
EvanQuoted 9 lines
-----Original Message-----
From: Christian König [mailto:[email protected]]
Sent: Monday, March 19, 2018 5:42 PM
To: Quan, Evan <[email protected]>; [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: disable job timeout on GPU reset
disabledAm 19.03.2018 um 07:08 schrieb Evan Quan:
Quoted 45 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Since under some heavy computing environment(dgemm test), it takes the asic over 10+ seconds to finish the dispatched single job which will trigger the timeout. It's quite confusing although it does not seem to bring any real problems.
As a quick workround, we choose to disable timeout when GPU reset is disabled.NAK, I enabled those warning intentionally even when the GPU
recovery is
Quoted 36 lines
Quoted 36 lines
disabled to have a hint in the logs what goes wrong.
Please only increase the timeout for the compute queue and/or add a separate timeout for them.
Regards,
Christian.drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void
Quoted 12 lines
Change-Id I3a95d856ba4993094dc7b6269649e470c5b053d2Signed-off-by Evan Quan <[email protected]>---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c| 7 +++++++1 file changed, 7 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-0@@ -861,6 +861,13 @@ static void
amdgpu_device_check_arguments(struct amdgpu_device *adev)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void · line 871
Quoted 11 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +7
-0amdgpu_lockup_timeout = 10000; } + /* + * 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 = INT_MAX; + adev->firmware.load_type = amdgpu_ucode_get_load_type(adev,
amdgpu_fw_load_type);Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-0}
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx