]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit9065245b12d77da4846aca5e2a20e76caea6eaaa
treea6a7b7bb4f1417439e6d1cb2833b892d3fe35b55
parentb1dd197e4c93ef43c5410e9d2ab7c00690191ab1
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