[PATCH v2 2/2] drm/amdgpu: Use new TTM flag to avoid OOM triggering.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2018-01-16 10:18 AM, Andrey Grodzovsky wrote:
> Avoid OOM on syatem pages allocations.
>
> v2:
> Remove modeprobe parameter, making this behaviour the only option.
>
> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> index 5c4c3e0..b4dc3bd 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> @@ -420,6 +420,10 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev,
>  #endif
>  
>  	bo->tbo.bdev = &adev->mman.bdev;
> +
> +	/* We opt to avoid OOM on system pages allocations */
> +	bo->tbo.bdev->no_retry = true;
> +

Couldn't this be done once in amdgpu_ttm_init just after calling
ttm_bo_device_init? No need to do this for every BO creation.

Regards,
  Felix

>  	amdgpu_ttm_placement_from_domain(bo, domain);
>  
>  	r = ttm_bo_init_reserved(&adev->mman.bdev, &bo->tbo, size, type,



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux