OSDN Git Service

drm/i915: Remove waiting & retiring from shrinker paths
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 21 Jun 2019 18:37:57 +0000 (19:37 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 21 Jun 2019 18:47:48 +0000 (19:47 +0100)
commit9e9539800dd44b1190128d48a116f4660f5d206f
tree2c849e4e2c45b3ad64a1144d76625d4356353b73
parent2ae70d28f27f6a5358541845c623760754d63ece
drm/i915: Remove waiting & retiring from shrinker paths

i915_gem_wait_for_idle() and i915_retire_requests() introduce a
dependency on the timeline->mutex. This is problematic as we want to
later perform allocations underneath i915_active.mutex, forming a link
between the shrinker, the timeline and active mutexes. Nip this cycle in
the bud by removing the acquisition of the timeline mutex (i.e.
retiring) from inside the shrinker.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190621183801.23252-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c
drivers/gpu/drm/i915/gt/intel_gt_types.h
drivers/gpu/drm/i915/gt/intel_timeline.c