drm/i915: Only track live rings for retiring
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 30 Apr 2018 13:15:03 +0000 (14:15 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 30 Apr 2018 15:01:20 +0000 (16:01 +0100)
commit643b450a594e9cb57fbd2534d1571d244faddd01
tree161ad01d63b4126d339ac70f10149e9c07638b3e
parentb887d61546245389c0304d8b1371bab9af8106c2
drm/i915: Only track live rings for retiring

We don't need to track every ring for its lifetime as they are managed
by the contexts/engines. What we do want to track are the live rings so
that we can sporadically clean up requests if userspace falls behind. We
can simply restrict the gt->rings list to being only gt->live_rings.

v2: s/live/active/ for consistency with gt.active_requests

Suggested-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180430131503.5375-4-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_request.c
drivers/gpu/drm/i915/intel_ringbuffer.c
drivers/gpu/drm/i915/intel_ringbuffer.h
drivers/gpu/drm/i915/selftests/mock_engine.c
drivers/gpu/drm/i915/selftests/mock_gem_device.c