mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
drm/amdgpu: Update BO eviction priorities
[ Upstream commit b0b13d532105e0e682d95214933bb8483a063184 ] Make SVM BOs more likely to get evicted than other BOs. These BOs opportunistically use available VRAM, but can fall back relatively seamlessly to system memory. It also avoids SVM migrations evicting other, more important BOs as they will evict other SVM allocations first. Signed-off-by: Felix Kuehling <felix.kuehling@amd.com> Acked-by: Mukul Joshi <mukul.joshi@amd.com> Tested-by: Mukul Joshi <mukul.joshi@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
85a37f59d7
commit
3bec2fc83b
@@ -585,6 +585,8 @@ int amdgpu_bo_create(struct amdgpu_device *adev,
|
|||||||
else
|
else
|
||||||
amdgpu_bo_placement_from_domain(bo, bp->domain);
|
amdgpu_bo_placement_from_domain(bo, bp->domain);
|
||||||
if (bp->type == ttm_bo_type_kernel)
|
if (bp->type == ttm_bo_type_kernel)
|
||||||
|
bo->tbo.priority = 2;
|
||||||
|
else if (!(bp->flags & AMDGPU_GEM_CREATE_DISCARDABLE))
|
||||||
bo->tbo.priority = 1;
|
bo->tbo.priority = 1;
|
||||||
|
|
||||||
if (!bp->destroy)
|
if (!bp->destroy)
|
||||||
|
|||||||
Reference in New Issue
Block a user