Skip to content

Commit b0b13d5

Browse files
fxkamdalexdeucher
authored andcommitted
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: Felix Kuehling <[email protected]> Acked-by: Mukul Joshi <[email protected]> Tested-by: Mukul Joshi <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent d59198d commit b0b13d5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_object.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,8 @@ int amdgpu_bo_create(struct amdgpu_device *adev,
605605
else
606606
amdgpu_bo_placement_from_domain(bo, bp->domain);
607607
if (bp->type == ttm_bo_type_kernel)
608+
bo->tbo.priority = 2;
609+
else if (!(bp->flags & AMDGPU_GEM_CREATE_DISCARDABLE))
608610
bo->tbo.priority = 1;
609611

610612
if (!bp->destroy)

0 commit comments

Comments
 (0)