[PATCH] drm/amdgpu: set default num_kcq to 2 under sriov

Christian König christian.koenig at amd.com
Fri May 5 08:34:43 UTC 2023


Am 05.05.23 um 08:39 schrieb YuBiao Wang:
> The number of kernel queues has impact on the latency under sriov
> usecase. So to reduce the latency we set the default num_kcq = 2 under
> sriov if not set manually.
>
> Signed-off-by: YuBiao Wang <YuBiao.Wang at amd.com>

Reviewed-by: Christian König <christian.koenig at amd.com>

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
> index 1311e42ab8e9..d0ad7cb0fa05 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
> @@ -68,6 +68,9 @@ void amdgpu_virt_init_setting(struct amdgpu_device *adev)
>   	/* enable mcbp for sriov */
>   	amdgpu_mcbp = 1;
>   
> +	/* Reduce kcq number to 2 to reduce latency */
> +	if (amdgpu_num_kcq == -1)
> +		amdgpu_num_kcq = 2;
>   }
>   
>   void amdgpu_virt_kiq_reg_write_reg_wait(struct amdgpu_device *adev,



More information about the amd-gfx mailing list