]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Handle idling during i915_gem_evict_something busy loops
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 9 May 2020 11:52:17 +0000 (12:52 +0100)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Wed, 13 May 2020 21:39:41 +0000 (14:39 -0700)
commit09d23b43831595189cfa0f9f886e60cc37874658
tree3934e0eed73ddf9b2135db6bcf42a47086f3186b
parent430b6a0173d0ed1f69e37e7d941e131e8fde0674
drm/i915: Handle idling during i915_gem_evict_something busy loops

i915_gem_evict_something() is charged with finding a slot within the GTT
that we may reuse. Since our goal is not to stall, we first look for a
slot that only overlaps idle vma. To this end, on the first pass we move
any active vma to the end of the search list. However, we only stopped
moving active vma after we see the first active vma twice. If during the
search, that first active vma completed, we would not notice and keep on
extending the search list.

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1746
Fixes: 587eefbe9921 ("drm/i915: Pull i915_vma_pin under the vm->mutex")
Fixes: 1912e1b11c59 ("drm/i915: Coordinate i915_active with its own mutex")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: <stable@vger.kernel.org> # v5.5+
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200509115217.26853-1-chris@chris-wilson.co.uk
(cherry picked from commit 73e28cc40bf00b5d168cb8f5cff1ae63e9097446)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/i915/i915_gem_evict.c