* [PATCH] drm/amdgpu: For sriov multiple VF, set compute timeout to 10s
@ 2021-01-06 11:41 Emily.Deng
2021-01-06 12:54 ` Paul Menzel
0 siblings, 1 reply; 3+ messages in thread
From: Emily.Deng @ 2021-01-06 11:41 UTC (permalink / raw)
To: amd-gfx; +Cc: Emily.Deng
For multiple VF, after engine hang,as host driver will first
encounter FLR, so has no meanning to set compute to 60s.
Signed-off-by: Emily.Deng <Emily.Deng@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index b69c34074d8d..ed36bf97df29 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -3117,8 +3117,10 @@ static int amdgpu_device_get_job_timeout_settings(struct amdgpu_device *adev)
*/
adev->gfx_timeout = msecs_to_jiffies(10000);
adev->sdma_timeout = adev->video_timeout = adev->gfx_timeout;
- if (amdgpu_sriov_vf(adev) || amdgpu_passthrough(adev))
+ if ((amdgpu_sriov_vf(adev) && amdgpu_sriov_is_pp_one_vf(adev)) || amdgpu_passthrough(adev))
adev->compute_timeout = msecs_to_jiffies(60000);
+ else if (amdgpu_sriov_vf(adev))
+ adev->compute_timeout = msecs_to_jiffies(10000);
else
adev->compute_timeout = MAX_SCHEDULE_TIMEOUT;
--
2.25.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/amdgpu: For sriov multiple VF, set compute timeout to 10s
2021-01-06 11:41 [PATCH] drm/amdgpu: For sriov multiple VF, set compute timeout to 10s Emily.Deng
@ 2021-01-06 12:54 ` Paul Menzel
2021-01-07 2:31 ` Deng, Emily
0 siblings, 1 reply; 3+ messages in thread
From: Paul Menzel @ 2021-01-06 12:54 UTC (permalink / raw)
To: Emily Deng; +Cc: amd-gfx
Dear Emily,
Am 06.01.21 um 12:41 schrieb Emily.Deng:
Could you please remove the dot your name in your git configuration?
git config --global user.name "Emily Deng"
For the summary, maybe amend it to:
Decrease compute timeout to 10 s for sriov multiple VF
> For multiple VF, after engine hang,as host driver will first
Nit: Please add a space after the comma.
> encounter FLR, so has no meanning to set compute to 60s.
meaning
How can this be tested?
> Signed-off-by: Emily.Deng <Emily.Deng@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index b69c34074d8d..ed36bf97df29 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -3117,8 +3117,10 @@ static int amdgpu_device_get_job_timeout_settings(struct amdgpu_device *adev)
> */
> adev->gfx_timeout = msecs_to_jiffies(10000);
> adev->sdma_timeout = adev->video_timeout = adev->gfx_timeout;
> - if (amdgpu_sriov_vf(adev) || amdgpu_passthrough(adev))
> + if ((amdgpu_sriov_vf(adev) && amdgpu_sriov_is_pp_one_vf(adev)) || amdgpu_passthrough(adev))
> adev->compute_timeout = msecs_to_jiffies(60000);
> + else if (amdgpu_sriov_vf(adev))
> + adev->compute_timeout = msecs_to_jiffies(10000);
Maybe split up the first if condition to group the condition and not he
timeout values. At least for me that would be less confusing:
if (amdgpu_sriov_vf(adev))
adev->compute_timeout = amdgpu_sriov_is_pp_one_vf(adev) ?
msecs_to_jiffies(60000) : msecs_to_jiffies(10000)
else if (amdgpu_passthrough(adev))
adev->compute_timeout = msecs_to_jiffies(60000);
> else
> adev->compute_timeout = MAX_SCHEDULE_TIMEOUT;
Kind regards,
Paul
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] drm/amdgpu: For sriov multiple VF, set compute timeout to 10s
2021-01-06 12:54 ` Paul Menzel
@ 2021-01-07 2:31 ` Deng, Emily
0 siblings, 0 replies; 3+ messages in thread
From: Deng, Emily @ 2021-01-07 2:31 UTC (permalink / raw)
To: Paul Menzel; +Cc: amd-gfx
[AMD Official Use Only - Internal Distribution Only]
>-----Original Message-----
>From: Paul Menzel <pmenzel@molgen.mpg.de>
>Sent: Wednesday, January 6, 2021 8:54 PM
>To: Deng, Emily <Emily.Deng@amd.com>
>Cc: amd-gfx@lists.freedesktop.org
>Subject: Re: [PATCH] drm/amdgpu: For sriov multiple VF, set compute timeout
>to 10s
>
>Dear Emily,
>
>
>Am 06.01.21 um 12:41 schrieb Emily.Deng:
>
>Could you please remove the dot your name in your git configuration?
>
> git config --global user.name "Emily Deng"
Ok, will do this.
>
>For the summary, maybe amend it to:
>
> Decrease compute timeout to 10 s for sriov multiple VF
Ok, thanks, good suggestion.
>
>> For multiple VF, after engine hang,as host driver will first
>
>Nit: Please add a space after the comma.
>
>> encounter FLR, so has no meanning to set compute to 60s.
>
>meaning
>
>How can this be tested?
Setup the environment for sriov.
>
>> Signed-off-by: Emily.Deng <Emily.Deng@amd.com>
>> ---
>> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> index b69c34074d8d..ed36bf97df29 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> @@ -3117,8 +3117,10 @@ static int
>amdgpu_device_get_job_timeout_settings(struct amdgpu_device *adev)
>> */
>> adev->gfx_timeout = msecs_to_jiffies(10000);
>> adev->sdma_timeout = adev->video_timeout = adev->gfx_timeout;
>> -if (amdgpu_sriov_vf(adev) || amdgpu_passthrough(adev))
>> +if ((amdgpu_sriov_vf(adev) && amdgpu_sriov_is_pp_one_vf(adev)) ||
>> +amdgpu_passthrough(adev))
>> adev->compute_timeout = msecs_to_jiffies(60000);
>> +else if (amdgpu_sriov_vf(adev))
>> +adev->compute_timeout = msecs_to_jiffies(10000);
>
>Maybe split up the first if condition to group the condition and not he timeout
>values. At least for me that would be less confusing:
>
> if (amdgpu_sriov_vf(adev))
> adev->compute_timeout = amdgpu_sriov_is_pp_one_vf(adev) ?
>msecs_to_jiffies(60000) : msecs_to_jiffies(10000)
> else if (amdgpu_passthrough(adev))
> adev->compute_timeout = msecs_to_jiffies(60000);
>
>> else
>> adev->compute_timeout = MAX_SCHEDULE_TIMEOUT;
>
Good suggestion, will send out v2 patch
>
>Kind regards,
>
>Paul
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-01-07 2:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-06 11:41 [PATCH] drm/amdgpu: For sriov multiple VF, set compute timeout to 10s Emily.Deng
2021-01-06 12:54 ` Paul Menzel
2021-01-07 2:31 ` Deng, Emily
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.