Re: [PATCH] drm/amdgpu: Update BO eviction priorities

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


Am 18.04.24 um 20:06 schrieb Felix Kuehling:
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

Signed-off-by: Felix Kuehling <felix.kuehling@xxxxxxx>

Good point and at least of hand I can't think of anything which could go wrong here.

Just keep an eye on potentially failing CI tests since we haven't really exercised this functionality in recent years.

Reviewed-by: Christian König <christian.koenig@xxxxxxx>


  drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index cd2dd3ed7153..d80671535ab3 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -608,6 +608,8 @@ int amdgpu_bo_create(struct amdgpu_device *adev,
  		amdgpu_bo_placement_from_domain(bo, bp->domain);
  	if (bp->type == ttm_bo_type_kernel)
+		bo->tbo.priority = 2;
+	else if (!(bp->flags & AMDGPU_GEM_CREATE_DISCARDABLE))
  		bo->tbo.priority = 1;
if (!bp->destroy)

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

  Powered by Linux