@@ -124,7 +124,8 @@ i915_gem_evict_something(struct i915_address_space *vm,
min_size, alignment, color,
start, end, mode);
- intel_gt_retire_requests(vm->gt);
+ if (!(flags & PIN_NONBLOCK))
+ intel_gt_retire_requests(vm->gt);
search_again:
active = NULL;
@@ -270,7 +271,8 @@ int i915_gem_evict_for_node(struct i915_address_space *vm,
* a stray pin (preventing eviction) that can only be resolved by
* retiring.
*/
- intel_gt_retire_requests(vm->gt);
+ if (!(flags & PIN_NONBLOCK))
+ intel_gt_retire_requests(vm->gt);
if (i915_vm_has_cache_coloring(vm)) {
/* Expand search to cover neighbouring guard pages (or lack!) */
We want to keep the PIN_NONBLOCK search quick, avoiding evicting recently active nodes. To that end, skip performing the more laborious retirement prior to beginning the fast search. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- drivers/gpu/drm/i915/i915_gem_evict.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)