[Intel-gfx] [RFC 0/3] Waitboost drm syncobj waits

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Thu Feb 9 15:43:12 UTC 2023


From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

In i915 we have this concept of "wait boosting" where we give a priority boost
for instance to fences which are actively waited upon from userspace. This has
it's pros and cons and can certainly be discussed at lenght. However fact is
some workloads really like it.

Problem is that with the arrival of drm syncobj and a new userspace waiting
entry point it added, the waitboost mechanism was bypassed. Hence I cooked up
this mini series really (really) quickly to see if some discussion can be had.

It adds a concept of "wait count" to dma fence, which is incremented for every
explicit dma_fence_enable_sw_signaling and dma_fence_add_wait_callback (like
dma_fence_add_callback but from explicit/userspace wait paths).

Individual drivers can then inspect this via dma_fence_wait_count() and decide
to wait boost the waits on such fences.

Again, quickly put together and smoke tested only - no guarantees whatsoever and
I will rely on interested parties to test and report if it even works or how
well.

Tvrtko Ursulin (3):
  dma-fence: Track explicit waiters
  drm/syncobj: Mark syncobj waits as external waiters
  drm/i915: Waitboost external waits

 drivers/dma-buf/dma-fence.c         | 102 ++++++++++++++++++++--------
 drivers/gpu/drm/drm_syncobj.c       |   6 +-
 drivers/gpu/drm/i915/i915_request.c |  13 +++-
 include/linux/dma-fence.h           |  14 ++++
 4 files changed, 101 insertions(+), 34 deletions(-)

-- 
2.34.1



More information about the Intel-gfx mailing list