[PATCH] drm/amdgpu/sriov: give 8s for recover vram under RUNTIME

Paul Menzel pmenzel+amd-gfx at molgen.mpg.de
Wed Aug 8 14:28:30 UTC 2018


Dear Deng,


On 08/08/18 04:13, Emily Deng wrote:
> Modify the commit message

I guess the line above is a leftover from some template, and can be
removed?

> Extend the timeout for recovering vram bos from shadows on sr-iov
> to cover the worst case scenario for timeslices and VFs
> 
> Under runtime, the wait fence time could be quite long when
> other VFs are in exclusive mode. For example, for 4 VF, every
> VF's exclusive timeout time is set to 3s, then the worst case is
> 9s. If the VF number is more than 4,then the worst case time will
> be longer.

Nit: Missing space after the comma.

How did you get to nine seconds? Isn’t it four times three, which is
twelve?

> The 8s is the test data, with setting to 8s, it will pass the TDR
> test for 1000 times.
> 
> SWDEV-161490
> 
> Change-Id: Ifc32d56ca7fde01b1f4fe2b0db6959b51909008a
> Signed-off-by: Monk Liu <Monk.Liu at amd.com>
> Signed-off-by: Emily Deng <Emily.Deng at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 1d933db..ef82ad1 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -3124,7 +3124,7 @@ static int amdgpu_device_handle_vram_lost(struct amdgpu_device *adev)
>  	long tmo;
>  
>  	if (amdgpu_sriov_runtime(adev))
> -		tmo = msecs_to_jiffies(amdgpu_lockup_timeout);
> +		tmo = msecs_to_jiffies(8000);

Actually, I do not understand the change at all. Isn’t that a module
parameter?

```
$ git grep amdgpu_lockup_timeout
drivers/gpu/drm/amd/amdgpu/amdgpu.h:extern int amdgpu_lockup_timeout;
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:     if (amdgpu_lockup_timeout == 0) {
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:             amdgpu_lockup_timeout = 10000;
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:             tmo = msecs_to_jiffies(amdgpu_lockup_timeout);
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:int amdgpu_lockup_timeout = 10000;
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:module_param_named(lockup_timeout, amdgpu_lockup_timeout, int, 0444);
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:                      timeout = msecs_to_jiffies(amdgpu_lockup_timeout);
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c:  if (amdgpu_lockup_timeout == 0)
```

So, if it’s not set, the time-out is set to 10(!) seconds anyway,
isn’t it? What am I missing?

>  	else
>  		tmo = msecs_to_jiffies(100);
>  
> 

In my opinion, such time-outs need to have a big FIXME added to
it, and VF’s exclusive time-outs should be drastically decreased.


Kind regards,

Paul

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5174 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20180808/612643cd/attachment.bin>


More information about the amd-gfx mailing list