intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH 0/9] remove rcu support from i915_address_space
@ 2021-08-02 15:47 Daniel Vetter
  2021-08-02 15:47 ` [Intel-gfx] [PATCH 1/9] drm/i915: Drop code to handle set-vm races from execbuf Daniel Vetter
                   ` (14 more replies)
  0 siblings, 15 replies; 18+ messages in thread
From: Daniel Vetter @ 2021-08-02 15:47 UTC (permalink / raw)
  To: DRI Development; +Cc: Intel Graphics Development, Daniel Vetter

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


^ permalink raw reply	[flat|nested] 18+ messages in thread
* [Intel-gfx] [PATCH 0/9] remove rcu support from i915_address_space
@ 2021-08-04 14:25 Daniel Vetter
  0 siblings, 0 replies; 18+ messages in thread
From: Daniel Vetter @ 2021-08-04 14:25 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: DRI Development, Daniel Vetter

Hi all,

Next round with some fixes:
- missed a conversion, 0day spotted it running sparse
- missed virtual engines in the last patch, intel-gfx-ci spotted that too
  (except it was mostly filtered out by a bogus cibuglog entry, so took a
  while to realize what's going on).

Old version:

https://lore.kernel.org/dri-devel/20210802154806.3710472-1-daniel.vetter@ffwll.ch/

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   | 86 ++++---------------
 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 | 34 +++-----
 .../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_engine.h        |  4 +
 drivers/gpu/drm/i915/gt/intel_engine_cs.c     | 21 ++++-
 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 +-
 20 files changed, 105 insertions(+), 128 deletions(-)

-- 
2.32.0


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2021-08-04 14:25 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-02 15:47 [Intel-gfx] [PATCH 0/9] remove rcu support from i915_address_space Daniel Vetter
2021-08-02 15:47 ` [Intel-gfx] [PATCH 1/9] drm/i915: Drop code to handle set-vm races from execbuf Daniel Vetter
2021-08-02 15:47 ` [Intel-gfx] [PATCH 2/9] drm/i915: Rename i915_gem_context_get_vm_rcu to i915_gem_context_get_eb_vm Daniel Vetter
2021-08-02 15:48 ` [Intel-gfx] [PATCH 3/9] drm/i915: Use i915_gem_context_get_eb_vm in ctx_getparam Daniel Vetter
2021-08-02 15:48 ` [Intel-gfx] [PATCH 4/9] drm/i915: Add i915_gem_context_is_full_ppgtt Daniel Vetter
2021-08-02 15:48 ` [Intel-gfx] [PATCH 5/9] drm/i915: Use i915_gem_context_get_eb_vm in intel_context_set_gem Daniel Vetter
2021-08-02 15:48 ` [Intel-gfx] [PATCH 6/9] drm/i915: Drop __rcu from gem_context->vm Daniel Vetter
2021-08-03  0:35   ` kernel test robot
2021-08-02 15:48 ` [Intel-gfx] [PATCH 7/9] drm/i915: use xa_lock/unlock for fpriv->vm_xa lookups Daniel Vetter
2021-08-02 15:48 ` [Intel-gfx] [PATCH 8/9] drm/i915: Stop rcu support for i915_address_space Daniel Vetter
2021-08-02 15:48 ` [Intel-gfx] [PATCH 9/9] drm/i915: Split out intel_context_create_user Daniel Vetter
2021-08-02 16:44 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for remove rcu support from i915_address_space Patchwork
2021-08-02 16:45 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-08-02 17:14 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2021-08-03 12:38 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for remove rcu support from i915_address_space (rev2) Patchwork
2021-08-03 12:40 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-08-03 13:09 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2021-08-04 14:25 [Intel-gfx] [PATCH 0/9] remove rcu support from i915_address_space Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).