OSDN Git Service

drm/i915/gtt: Defer address space cleanup to an RCU worker
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 20 Jun 2019 18:37:05 +0000 (19:37 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 20 Jun 2019 20:52:30 +0000 (21:52 +0100)
commitb32fa811156328aea5a3c2ff05cc096490382456
treea6a7b7bb4f1417439e6d1cb2833b892d3fe35b55
parent683d672c425aa29c0e74583ed28a0e011cc0bb43
drm/i915/gtt: Defer address space cleanup to an RCU worker

Enable RCU protection of i915_address_space and its ppgtt superclasses,
and defer its cleanup into a worker executed after an RCU grace period.

In the future we will be able to use the RCU protection to reduce the
locking around VM lookups, but the immediate benefit is being able to
defer the release into a kworker (process context). This is required as
we may need to sleep to reap the WC pages stashed away inside the ppgtt.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110934
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190620183705.31006-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/Makefile.header-test
drivers/gpu/drm/i915/i915_gem_gtt.c
drivers/gpu/drm/i915/i915_gem_gtt.h
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c