]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Avoid live-lock with i915_vma_parked()
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 23 Mar 2020 09:28:35 +0000 (09:28 +0000)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 26 Mar 2020 17:21:30 +0000 (10:21 -0700)
commit7bf15b80096ca7d9360e6a9c27f294cbd44553b6
tree3409642608a3e33534ce8b8920f5399d6d6c7350
parent0b15235dadea7a296233bad319c4dfbe34cac560
drm/i915: Avoid live-lock with i915_vma_parked()

Abuse^W Take advantage that we know we are inside the GT wakeref and
that prevents any client execbuf from reopening the i915_vma in order to
claim all the vma to close without having to drop the spinlock to free
each one individually. By keeping the spinlock, we do not have to
restart if we run concurrently with i915_gem_free_objects -- which
causes them both to restart continually and make very very slow
progress.

Closes: https://gitlab.freedesktop.org/drm/intel/issues/1361
Fixes: 5d93067baa0b ("drm/i915: Claim vma while under closed_lock in i915_vma_parked()")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200323092841.22240-2-chris@chris-wilson.co.uk
(cherry picked from commit 3447c4c55d0edc95742fdcd91c3efb050546b907)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/i915/i915_vma.c