drm/i915/breadcrumbs: Drop request reference for the signaler thread
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 3 Feb 2018 10:19:14 +0000 (10:19 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 5 Feb 2018 15:26:51 +0000 (15:26 +0000)
commitb7a3f33bd5abfb0b693831d3b5230851f508e330
tree06ef57e3aac343737a595095fc151c6a4fe14464
parent24eae08d442eb6e9046a6d07abaa3e419bf429d8
drm/i915/breadcrumbs: Drop request reference for the signaler thread

If we remember to cancel the signaler on a request when retiring it
(after we know that the request has been signaled), we do not need to
carry an additional request in the signaler itself. This prevents an
issue whereby the signaler threads may be delayed and hold on to
thousands of request references, causing severe memory fragmentation and
premature oom (most noticeable on 32b snb due to the limited GFP_KERNEL
and frequent use of inter-engine fences).

v2: Rename first_signal(), document reads outside of locks.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180203101914.24880-1-chris@chris-wilson.co.uk
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
drivers/gpu/drm/i915/i915_gem_request.c
drivers/gpu/drm/i915/intel_breadcrumbs.c