Skip to content

drm/atomic: Lockless blocking commits

Ville Syrjala dri-devel intel-gfx 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4drm/atomic: Treat a nonblocking commit following a blocking commit as blocking commitdrivers/gpu/drm/drm_atomic_helper.c include/drm/drm_atomic.h+19 -70 replies
2/4drm/i915: Don't reuse commit_work for the cleanupdrivers/gpu/drm/i915/display/intel_display.c drivers/gpu/drm/i915/display/intel_display_types.h+4 -30 replies
3/4drm/atomic: Allow lockless blocking commitsdrivers/gpu/drm/drm_atomic.c drivers/gpu/drm/drm_atomic_uapi.c include/drm/drm_atomic.h+39 -50 replies
4/4drm/i915: Make blocking commits locklessdrivers/gpu/drm/i915/display/intel_display.c+2 -70 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] drm/atomic: Lockless blocking commits

From: Ville Syrjälä <[email protected]>

I've talked about making blocking commits lockless a few times in the past, so here's finally an attempt at it. The main benefit I see from this is that TEST_ONLY commits no longer getting blocked on the mutexes by parallel blocking commits.

I have a small test here that spools up two threads, one does just TEST_ONLY commits in a loop, the other does either blocking or non-blocking page flips. Results came out as follows on a snb machine here:

test-only-vs-non-blocking:
-85319 TEST_ONLY commits in 2000000 usecs, 23 usecs / commit +87144 TEST_ONLY commits in 2000006 usecs, 22 usecs / commit

test-only-vs-blocking:
-219 TEST_ONLY commits in 2001768 usecs, 9140 usecs / commit +82442 TEST_ONLY commits in 2000011 usecs, 24 usecs / commit

Now, I have no idea if anyone actually cares about lack of parallelism due to locked blocking commits or not. Hence Cc'd some compositor folks as well. I guess this is more of an RFC at this point.

Also curious to see if CI goes up in smoke or not...

Cc Daniel Vetter <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Rob Clark <[email protected]>
Cc Simon Ser <[email protected]>
Cc Pekka Paalanen <[email protected]>
Cc Jonas Ådahl <[email protected]>

Ville Syrjälä (4):
drm/atomic: Treat a nonblocking commit following a blocking commit as
blocking commit
drm/i915: Don't reuse commit_work for the cleanup drm/atomic: Allow lockless blocking commits
drm/i915: Make blocking commits lockless

 drivers/gpu/drm/drm_atomic.c                  | 32 +++++++++++++++++--
 drivers/gpu/drm/drm_atomic_helper.c           | 19 +++++++----
 drivers/gpu/drm/drm_atomic_uapi.c             | 11 +++++--
 drivers/gpu/drm/i915/display/intel_display.c  | 15 +++------
 .../drm/i915/display/intel_display_types.h    |  1 +
 include/drm/drm_atomic.h                      |  8 +++++
 6 files changed, 64 insertions(+), 22 deletions(-)
Signature · 1 line
2.35.1