All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [RFC v2 0/5] Waitboost drm syncobj waits
@ 2023-02-10 13:06 ` Tvrtko Ursulin
  0 siblings, 0 replies; 40+ messages in thread
From: Tvrtko Ursulin @ 2023-02-10 13:06 UTC (permalink / raw)
  To: Intel-gfx, dri-devel

From: Tvrtko Ursulin <tvrtko.ursulin@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.

v2:
 * Small fixups based on CI feedback:
    * Handle decrement correctly for already signalled case while adding callback.
    * Remove i915 assert which was making sure struct i915_request does not grow.
 * Split out the i915 patch into three separate functional changes.

Tvrtko Ursulin (5):
  dma-fence: Track explicit waiters
  drm/syncobj: Mark syncobj waits as external waiters
  drm/i915: Waitboost external waits
  drm/i915: Mark waits as explicit
  drm/i915: Wait boost requests waited upon by others

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

-- 
2.34.1


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

end of thread, other threads:[~2023-02-20 17:14 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-10 13:06 [Intel-gfx] [RFC v2 0/5] Waitboost drm syncobj waits Tvrtko Ursulin
2023-02-10 13:06 ` Tvrtko Ursulin
2023-02-10 13:06 ` [Intel-gfx] [RFC 1/5] dma-fence: Track explicit waiters Tvrtko Ursulin
2023-02-10 13:06   ` Tvrtko Ursulin
2023-02-10 13:06 ` [Intel-gfx] [RFC 2/5] drm/syncobj: Mark syncobj waits as external waiters Tvrtko Ursulin
2023-02-10 13:06   ` Tvrtko Ursulin
2023-02-10 13:06 ` [Intel-gfx] [RFC 3/5] drm/i915: Waitboost external waits Tvrtko Ursulin
2023-02-10 13:06   ` Tvrtko Ursulin
2023-02-10 13:06 ` [Intel-gfx] [RFC 4/5] drm/i915: Mark waits as explicit Tvrtko Ursulin
2023-02-10 13:06   ` Tvrtko Ursulin
2023-02-10 13:06 ` [Intel-gfx] [RFC 5/5] drm/i915: Wait boost requests waited upon by others Tvrtko Ursulin
2023-02-10 13:06   ` Tvrtko Ursulin
2023-02-10 13:24 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for Waitboost drm syncobj waits (rev2) Patchwork
2023-02-10 17:05 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2023-02-14 19:14 ` [Intel-gfx] [RFC v2 0/5] Waitboost drm syncobj waits Rob Clark
2023-02-14 19:26   ` Rob Clark
2023-02-16 11:19   ` Tvrtko Ursulin
2023-02-16 15:43     ` Rob Clark
2023-02-16 15:43       ` Rob Clark
2023-02-16 18:19   ` Rodrigo Vivi
2023-02-16 18:19     ` Rodrigo Vivi
2023-02-16 19:59     ` Rob Clark
2023-02-16 19:59       ` Rob Clark
2023-02-17 12:56     ` Tvrtko Ursulin
2023-02-17 14:55       ` Rob Clark
2023-02-17 16:03         ` Tvrtko Ursulin
2023-02-17 17:00           ` Rob Clark
2023-02-17 20:45             ` Rodrigo Vivi
2023-02-17 20:45               ` Rodrigo Vivi
2023-02-17 23:38               ` Rob Clark
2023-02-17 23:38                 ` Rob Clark
2023-02-20 11:33               ` Tvrtko Ursulin
2023-02-20 15:52                 ` Rob Clark
2023-02-20 16:44                   ` Tvrtko Ursulin
2023-02-20 16:51                     ` Tvrtko Ursulin
2023-02-20 17:14                       ` Rob Clark
2023-02-20 17:07                     ` Rob Clark
2023-02-20 12:22             ` Tvrtko Ursulin
2023-02-20 15:45               ` Rob Clark
2023-02-20 15:56                 ` Tvrtko Ursulin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.