mirror of
https://github.com/torvalds/linux.git
synced 2026-09-28 12:02:03 +02:00
drm/xe: Keep walking on SVM eviction failure
The desired behavior for SVM eviction failures, which can occur due to
various uncontrollable races, is for TTM to continue walking the LRU
list and look for another eviction candidate. This is expressed by
returning -ENOSPC from the ->move() callback.
Adjust the SVM eviction failure path because of races in ->move() to
return -ENOSPC so that TTM continues searching for another buffer to
evict.
Fixes: 3ca608dc75 ("drm/xe: Basic SVM BO eviction")
Cc: stable@vger.kernel.org
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Link: https://patch.msgid.link/20260917203158.292823-1-matthew.brost@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
(cherry picked from commit 36a86c23588b8f57c9d20feb4cf5a2ab27e3baba)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
This commit is contained in:
parent
c7a925c847
commit
be1df8bada
|
|
@ -1037,6 +1037,13 @@ static int xe_bo_move(struct ttm_buffer_object *ttm_bo, bool evict,
|
|||
} else {
|
||||
drm_dbg(&xe->drm, "Evict system allocator BO failed=%pe\n",
|
||||
ERR_PTR(ret));
|
||||
/*
|
||||
* The semantic we want upon SVM eviction failure
|
||||
* because of racing access is keep walking for
|
||||
* eviction, which is -ENOSPC.
|
||||
*/
|
||||
if (ret == -EBUSY)
|
||||
ret = -ENOSPC;
|
||||
}
|
||||
|
||||
goto out;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user