Commit b0b13d53 authored by Felix Kuehling's avatar Felix Kuehling Committed by Alex Deucher

drm/amdgpu: Update BO eviction priorities

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: default avatarFelix Kuehling <felix.kuehling@amd.com>
Acked-by: default avatarMukul Joshi <mukul.joshi@amd.com>
Tested-by: default avatarMukul Joshi <mukul.joshi@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent d59198d2
...@@ -605,6 +605,8 @@ int amdgpu_bo_create(struct amdgpu_device *adev, ...@@ -605,6 +605,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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment