[Intel-gfx] [PATCH 0/9] remove rcu support from i915_address_space
Daniel Vetter
daniel.vetter at ffwll.ch
Mon Aug 2 15:47:57 UTC 2021
Hi all,
Jason wanted to do that as part of the scheduler series, but I object
since rcu is very, very hard to review when adding, and much, much harder
even to review when removing.
This is because simply looking for __rcu pointer annotations and rcu
functions isn't enough, rcu is also relied upon in many datastructures
which have internally and rcu_read_lock protection (or at least the
required amount of barriers), like xarray.
The other problem is that it inherits when chasing pointers, e.g.
i915_gem_engines has an rcu pointer to intel_context, which has a non-rcu
pointer to i915_address_space. But since we could look-up the entire chain
under rcu i.e. engines->context[i]->vm this means more code to audit.
The audit explodes pretty quickly.
Anyway I'm reasonable confident I got them all in the current code, and
slightly less confident that I managed to stitch together the full
history.
References to relevant commits throughout the series.
Cheers, Daniel
Daniel Vetter (9):
drm/i915: Drop code to handle set-vm races from execbuf
drm/i915: Rename i915_gem_context_get_vm_rcu to
i915_gem_context_get_eb_vm
drm/i915: Use i915_gem_context_get_eb_vm in ctx_getparam
drm/i915: Add i915_gem_context_is_full_ppgtt
drm/i915: Use i915_gem_context_get_eb_vm in intel_context_set_gem
drm/i915: Drop __rcu from gem_context->vm
drm/i915: use xa_lock/unlock for fpriv->vm_xa lookups
drm/i915: Stop rcu support for i915_address_space
drm/i915: Split out intel_context_create_user
drivers/gpu/drm/i915/gem/i915_gem_context.c | 82 ++++---------------
drivers/gpu/drm/i915/gem/i915_gem_context.h | 13 ++-
.../gpu/drm/i915/gem/i915_gem_context_types.h | 2 +-
.../gpu/drm/i915/gem/i915_gem_execbuffer.c | 12 ++-
.../gpu/drm/i915/gem/selftests/huge_pages.c | 8 +-
.../drm/i915/gem/selftests/i915_gem_context.c | 32 +++-----
.../gpu/drm/i915/gem/selftests/mock_context.c | 2 +-
drivers/gpu/drm/i915/gt/intel_context.c | 22 ++++-
drivers/gpu/drm/i915/gt/intel_context.h | 2 +
drivers/gpu/drm/i915/gt/intel_ggtt.c | 1 -
drivers/gpu/drm/i915/gt/intel_gtt.c | 6 +-
drivers/gpu/drm/i915/gt/intel_gtt.h | 2 +-
drivers/gpu/drm/i915/gt/selftest_execlists.c | 2 +-
drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 2 +-
drivers/gpu/drm/i915/i915_drv.h | 4 +-
drivers/gpu/drm/i915/i915_trace.h | 2 +-
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 4 +-
drivers/gpu/drm/i915/selftests/i915_vma.c | 4 +-
18 files changed, 79 insertions(+), 123 deletions(-)
--
2.32.0
More information about the Intel-gfx
mailing list