[PATCH] drm/amdgpu: Let BO created in its allowed_domain
Pan, Xinhui
Xinhui.Pan at amd.com
Fri Sep 17 07:35:12 UTC 2021
[AMD Official Use Only]
Why? just to evict some inactive vram BOs?
________________________________
From: Koenig, Christian <Christian.Koenig at amd.com>
Sent: Friday, September 17, 2021 3:06:16 PM
To: Pan, Xinhui <Xinhui.Pan at amd.com>; amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>
Cc: Deucher, Alexander <Alexander.Deucher at amd.com>
Subject: Re: [PATCH] drm/amdgpu: Let BO created in its allowed_domain
Am 17.09.21 um 09:04 schrieb xinhui pan:
> For any user BO, it is allowed to alloc memory in both GTT and VRAM
> domain. That means one VRAM BO could be eviced to GTT.
>
> Now if device is already lack of VRAM, this BO could alloc memory from
> GTT directly without evicting other VRAM BO. In this way we can reduce
> memory evictions.
NAK, that is intentional pressure on VRAM during allocation of new memory.
Christian.
>
> Signed-off-by: xinhui pan <xinhui.pan at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> index 66bb8a53bb20..9a547bb38cda 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> @@ -579,7 +579,7 @@ int amdgpu_bo_create(struct amdgpu_device *adev,
> AMDGPU_GEM_DOMAIN_GDS))
> amdgpu_bo_placement_from_domain(bo, AMDGPU_GEM_DOMAIN_CPU);
> else
> - amdgpu_bo_placement_from_domain(bo, bp->domain);
> + amdgpu_bo_placement_from_domain(bo, bo->allowed_domains);
> if (bp->type == ttm_bo_type_kernel)
> bo->tbo.priority = 1;
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20210917/9e22e295/attachment.htm>
More information about the amd-gfx
mailing list