Skip to contentSkip to conversation

Waitboost drm syncobj waits

RFC Superseded Tvrtko Ursulin 4 participants 19 messages Feb 16, 2023 – Feb 20, 2023

Subsystems (6)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v3 cover Waitboost drm syncobj waits

From: Tvrtko Ursulin <[email protected]>

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. AFAIU this mostly happens with all Vulkan based userspaces. Hence I cooked up this mini series to see if discussion about restoring the waitboost can be had.

The series adds a concept of "wait count" to dma fence which is intended to represent explicit userspace waits. It is therefore 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.

Patch has been slightly tested for performance impact by Google using some clvk workloads and shows a good improvement (frame time improved from 16ms to 13ms).

It is also important to mention that benefits of waitboosting are not only about workloads related to frame presentation time, but also for serialized computations which constantly move between the CPU and GPU.

*)
https://gitlab.freedesktop.org/drm/intel/-/issues/8014

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.

v3:
* Handle drivers which open-code callback additions.

Tvrtko Ursulin (9):
dma-fence: Move i915 helpers into common
dma-fence: Add callback initialization helper drm/i915: Use fence callback initialization helper drm/vmwgfx: Use fence callback initialization helper
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                 | 137 ++++++++++++++------
 drivers/gpu/drm/drm_syncobj.c               |   6 +-
 drivers/gpu/drm/i915/gt/intel_breadcrumbs.c |  22 ----
 drivers/gpu/drm/i915/gt/intel_engine_pm.c   |   1 -
 drivers/gpu/drm/i915/i915_active.c          |   2 +-
 drivers/gpu/drm/i915/i915_active.h          |   2 +-
 drivers/gpu/drm/i915/i915_request.c         |  13 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c       |   2 +-
 include/linux/dma-fence.h                   |  26 ++++
 9 files changed, 141 insertions(+), 70 deletions(-)
Signature · 1 line
2.34.1
#1 lore raw

RFC v3 1/9 dma-fence: Move i915 helpers into common

From: Tvrtko Ursulin <[email protected]>

Unhide some i915 helpers which are used for splitting the signalled check vs notification stages during en masse fence processing.

---
 drivers/dma-buf/dma-fence.c                 | 35 +++++++++++++++------
 drivers/gpu/drm/i915/gt/intel_breadcrumbs.c | 22 -------------
 include/linux/dma-fence.h                   |  4 +++
 3 files changed, 30 insertions(+), 31 deletions(-)
drivers/dma-buf/dma-fence.c +26 -9
index 0de0482cd36e..41da0da17eba 100644
@@ -344,6 +344,30 @@ void __dma_fence_might_wait(void)
 }
 #endif
 
+void __dma_fence_signal__timestamp(struct dma_fence *fence, ktime_t timestamp)
+{
+	lockdep_assert_held(fence->lock);
+
+	fence->timestamp = timestamp;
+	set_bit(DMA_FENCE_FLAG_TIMESTAMP_BIT, &fence->flags);
+	trace_dma_fence_signaled(fence);
+}
+EXPORT_SYMBOL(__dma_fence_signal__timestamp);
+
+void
+__dma_fence_signal__notify(struct dma_fence *fence,
+			   const struct list_head *list)
+{
+	struct dma_fence_cb *cur, *tmp;
+
+	lockdep_assert_held(fence->lock);
+
+	list_for_each_entry_safe(cur, tmp, list, node) {
+		INIT_LIST_HEAD(&cur->node);
+		cur->func(fence, cur);
+	}
+}
+EXPORT_SYMBOL(__dma_fence_signal__notify);
 
 /**
  * dma_fence_signal_timestamp_locked - signal completion of a fence
@@ -366,7 +390,6 @@ void __dma_fence_might_wait(void)
 int dma_fence_signal_timestamp_locked(struct dma_fence *fence,
 				      ktime_t timestamp)
 {
-	struct dma_fence_cb *cur, *tmp;
 	struct list_head cb_list;
 
 	lockdep_assert_held(fence->lock);
@@ -378,14 +401,8 @@ int dma_fence_signal_timestamp_locked(struct dma_fence *fence,
 	/* Stash the cb_list before replacing it with the timestamp */
 	list_replace(&fence->cb_list, &cb_list);
 
-	fence->timestamp = timestamp;
-	set_bit(DMA_FENCE_FLAG_TIMESTAMP_BIT, &fence->flags);
-	trace_dma_fence_signaled(fence);
-
-	list_for_each_entry_safe(cur, tmp, &cb_list, node) {
-		INIT_LIST_HEAD(&cur->node);
-		cur->func(fence, cur);
-	}
+	__dma_fence_signal__timestamp(fence, timestamp);
+	__dma_fence_signal__notify(fence, &cb_list);
 
 	return 0;
 }
drivers/gpu/drm/i915/gt/intel_breadcrumbs.c +0 -22
index ecc990ec1b95..26b6b777c479 100644
@@ -127,28 +127,6 @@ __dma_fence_signal(struct dma_fence *fence)
 	return !test_and_set_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags);
 }
 
-static void
-__dma_fence_signal__timestamp(struct dma_fence *fence, ktime_t timestamp)
-{
-	fence->timestamp = timestamp;
-	set_bit(DMA_FENCE_FLAG_TIMESTAMP_BIT, &fence->flags);
-	trace_dma_fence_signaled(fence);
-}
-
-static void
-__dma_fence_signal__notify(struct dma_fence *fence,
-			   const struct list_head *list)
-{
-	struct dma_fence_cb *cur, *tmp;
-
-	lockdep_assert_held(fence->lock);
-
-	list_for_each_entry_safe(cur, tmp, list, node) {
-		INIT_LIST_HEAD(&cur->node);
-		cur->func(fence, cur);
-	}
-}
-
 static void add_retire(struct intel_breadcrumbs *b, struct intel_timeline *tl)
 {
 	if (b->irq_engine)
include/linux/dma-fence.h +4 -0
index 775cdc0b4f24..2af328a89468 100644
@@ -367,6 +367,10 @@ static inline void dma_fence_end_signalling(bool cookie) {}
 static inline void __dma_fence_might_wait(void) {}
 #endif
 
+void __dma_fence_signal__timestamp(struct dma_fence *fence, ktime_t timestamp);
+void __dma_fence_signal__notify(struct dma_fence *fence,
+				const struct list_head *list);
+
 int dma_fence_signal(struct dma_fence *fence);
 int dma_fence_signal_locked(struct dma_fence *fence);
 int dma_fence_signal_timestamp(struct dma_fence *fence, ktime_t timestamp);
Signature · 1 line
2.34.1
#2 lore raw

RFC v3 2/9 dma-fence: Add callback initialization helper

In reply to Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

In preparation of adding a new field to struct dma_fence_cb we will need an initialization helper for those callers who add callbacks by open- coding. That will ensure they initialize all the fields so common code does not get confused by potential garbage in some fields.

---
 drivers/dma-buf/dma-fence.c | 10 ++++------
 include/linux/dma-fence.h   |  7 +++++++
 2 files changed, 11 insertions(+), 6 deletions(-)
drivers/dma-buf/dma-fence.c +4 -6
index 41da0da17eba..ea4a1f82c9bf 100644
@@ -662,21 +662,19 @@ int dma_fence_add_callback(struct dma_fence *fence, struct dma_fence_cb *cb,
 	unsigned long flags;
 	int ret = 0;
 
+	__dma_fence_cb_init(cb, func);
+
 	if (WARN_ON(!fence || !func))
 		return -EINVAL;
 
-	if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags)) {
-		INIT_LIST_HEAD(&cb->node);
+	if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags))
 		return -ENOENT;
-	}
 
 	spin_lock_irqsave(fence->lock, flags);
 
 	if (__dma_fence_enable_signaling(fence)) {
-		cb->func = func;
 		list_add_tail(&cb->node, &fence->cb_list);
 	} else {
-		INIT_LIST_HEAD(&cb->node);
 		ret = -ENOENT;
 	}
 
@@ -795,7 +793,7 @@ dma_fence_default_wait(struct dma_fence *fence, bool intr, signed long timeout)
 		goto out;
 	}
 
-	cb.base.func = dma_fence_default_wait_cb;
+	__dma_fence_cb_init(&cb.base, dma_fence_default_wait_cb);
 	cb.task = current;
 	list_add(&cb.base.node, &fence->cb_list);
 
include/linux/dma-fence.h +7 -0
index 2af328a89468..35933e0ae62c 100644
@@ -629,4 +629,11 @@ static inline bool dma_fence_is_container(struct dma_fence *fence)
 	return dma_fence_is_array(fence) || dma_fence_is_chain(fence);
 }
 
+static inline void __dma_fence_cb_init(struct dma_fence_cb *cb,
+				       dma_fence_func_t func)
+{
+	INIT_LIST_HEAD(&cb->node);
+	cb->func = func;
+}
+
 #endif /* __LINUX_DMA_FENCE_H */
Signature · 1 line
2.34.1
#3 lore raw

RFC v3 3/9 drm/i915: Use fence callback initialization helper

In reply to Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Use the previously added initialization helper to ensure correct operation of the common code.

---
 drivers/gpu/drm/i915/i915_active.c | 2 +-
 drivers/gpu/drm/i915/i915_active.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_active.c +1 -1
index 7412abf166a8..a9483aadb0ff 100644
@@ -887,7 +887,7 @@ int i915_active_acquire_preallocate_barrier(struct i915_active *ref,
 				goto unwind;
 
 			RCU_INIT_POINTER(node->base.fence, NULL);
-			node->base.cb.func = node_retire;
+			__dma_fence_cb_init(&node->base.cb, node_retire);
 			node->timeline = idx;
 			node->ref = ref;
 		}
drivers/gpu/drm/i915/i915_active.h +1 -1
index 7eb44132183a..da0c5b917cb1 100644
@@ -65,7 +65,7 @@ __i915_active_fence_init(struct i915_active_fence *active,
 			 dma_fence_func_t fn)
 {
 	RCU_INIT_POINTER(active->fence, fence);
-	active->cb.func = fn ?: i915_active_noop;
+	__dma_fence_cb_init(&active->cb, fn ?: i915_active_noop);
 }
 
 #define INIT_ACTIVE_FENCE(A) \
Signature · 1 line
2.34.1
#4 lore raw

RFC v3 4/9 drm/vmwgfx: Use fence callback initialization helper

In reply to Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Use the previously added initialization helper to ensure correct operation of the common code.

---
 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/vmwgfx/vmwgfx_fence.c +1 -1
index 2a0cda324703..0306596765e5 100644
@@ -200,7 +200,7 @@ static long vmw_fence_wait(struct dma_fence *f, bool intr, signed long timeout)
 		goto out;
 	}
 
-	cb.base.func = vmwgfx_wait_cb;
+	__dma_fence_cb_init(&cb.base, vmwgfx_wait_cb);
 	cb.task = current;
 	list_add(&cb.base.node, &f->cb_list);
 
Signature · 1 line
2.34.1
#5 lore raw

RFC v3 5/9 dma-fence: Track explicit waiters

In reply to Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Track how many callers are explicity waiting on a fence to signal and allow querying that via new dma_fence_wait_count() API.

This provides infrastructure on top of which generic "waitboost" concepts can be implemented by individual drivers. Wait-boosting is any reactive activity, such as raising the GPU clocks, which happens while there are active external waiters.

---
 drivers/dma-buf/dma-fence.c               | 98 +++++++++++++++++------
 drivers/gpu/drm/i915/gt/intel_engine_pm.c |  1 -
 include/linux/dma-fence.h                 | 15 ++++
 3 files changed, 87 insertions(+), 27 deletions(-)
drivers/dma-buf/dma-fence.c +72 -26
index ea4a1f82c9bf..bdba5a8e21b1 100644
@@ -344,6 +344,25 @@ void __dma_fence_might_wait(void)
 }
 #endif
 
+static void incr_wait_count(struct dma_fence *fence, struct dma_fence_cb *cb)
+{
+	lockdep_assert_held(fence->lock);
+
+	__set_bit(DMA_FENCE_CB_FLAG_WAITCOUNT_BIT, &cb->flags);
+	fence->waitcount++;
+	WARN_ON_ONCE(!fence->waitcount);
+}
+
+static void decr_wait_count(struct dma_fence *fence, struct dma_fence_cb *cb)
+{
+	lockdep_assert_held(fence->lock);
+
+	if (__test_and_clear_bit(DMA_FENCE_CB_FLAG_WAITCOUNT_BIT, &cb->flags)) {
+		WARN_ON_ONCE(!fence->waitcount);
+		fence->waitcount--;
+	}
+}
+
 void __dma_fence_signal__timestamp(struct dma_fence *fence, ktime_t timestamp)
 {
 	lockdep_assert_held(fence->lock);
@@ -363,6 +382,7 @@ __dma_fence_signal__notify(struct dma_fence *fence,
 	lockdep_assert_held(fence->lock);
 
 	list_for_each_entry_safe(cur, tmp, list, node) {
+		decr_wait_count(fence, cur);
 		INIT_LIST_HEAD(&cur->node);
 		cur->func(fence, cur);
 	}
@@ -629,11 +649,44 @@ void dma_fence_enable_sw_signaling(struct dma_fence *fence)
 	unsigned long flags;
 
 	spin_lock_irqsave(fence->lock, flags);
+	fence->waitcount++;
+	WARN_ON_ONCE(!fence->waitcount);
 	__dma_fence_enable_signaling(fence);
 	spin_unlock_irqrestore(fence->lock, flags);
 }
 EXPORT_SYMBOL(dma_fence_enable_sw_signaling);
 
+static int add_callback(struct dma_fence *fence, struct dma_fence_cb *cb,
+			dma_fence_func_t func, bool wait)
+{
+	unsigned long flags;
+	int ret = 0;
+
+	__dma_fence_cb_init(cb, func);
+
+	if (WARN_ON(!fence || !func))
+		return -EINVAL;
+
+	if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags))
+		return -ENOENT;
+
+	spin_lock_irqsave(fence->lock, flags);
+
+	if (wait)
+		incr_wait_count(fence, cb);
+
+	if (__dma_fence_enable_signaling(fence)) {
+		list_add_tail(&cb->node, &fence->cb_list);
+	} else {
+		decr_wait_count(fence, cb);
+		ret = -ENOENT;
+	}
+
+	spin_unlock_irqrestore(fence->lock, flags);
+
+	return ret;
+}
+
 /**
  * dma_fence_add_callback - add a callback to be called when the fence
  * is signaled
@@ -659,31 +712,18 @@ EXPORT_SYMBOL(dma_fence_enable_sw_signaling);
 int dma_fence_add_callback(struct dma_fence *fence, struct dma_fence_cb *cb,
 			   dma_fence_func_t func)
 {
-	unsigned long flags;
-	int ret = 0;
-
-	__dma_fence_cb_init(cb, func);
-
-	if (WARN_ON(!fence || !func))
-		return -EINVAL;
-
-	if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags))
-		return -ENOENT;
-
-	spin_lock_irqsave(fence->lock, flags);
-
-	if (__dma_fence_enable_signaling(fence)) {
-		list_add_tail(&cb->node, &fence->cb_list);
-	} else {
-		ret = -ENOENT;
-	}
-
-	spin_unlock_irqrestore(fence->lock, flags);
-
-	return ret;
+	return add_callback(fence, cb, func, false);
 }
 EXPORT_SYMBOL(dma_fence_add_callback);
 
+int dma_fence_add_wait_callback(struct dma_fence *fence,
+				struct dma_fence_cb *cb,
+				dma_fence_func_t func)
+{
+	return add_callback(fence, cb, func, true);
+}
+EXPORT_SYMBOL(dma_fence_add_wait_callback);
+
 /**
  * dma_fence_get_status - returns the status upon completion
  * @fence: the dma_fence to query
@@ -736,8 +776,10 @@ dma_fence_remove_callback(struct dma_fence *fence, struct dma_fence_cb *cb)
 	spin_lock_irqsave(fence->lock, flags);
 
 	ret = !list_empty(&cb->node);
-	if (ret)
+	if (ret) {
+		decr_wait_count(fence, cb);
 		list_del_init(&cb->node);
+	}
 
 	spin_unlock_irqrestore(fence->lock, flags);
 
@@ -795,6 +837,7 @@ dma_fence_default_wait(struct dma_fence *fence, bool intr, signed long timeout)
 
 	__dma_fence_cb_init(&cb.base, dma_fence_default_wait_cb);
 	cb.task = current;
+	incr_wait_count(fence, &cb.base);
 	list_add(&cb.base.node, &fence->cb_list);
 
 	while (!test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags) && ret > 0) {
@@ -811,8 +854,10 @@ dma_fence_default_wait(struct dma_fence *fence, bool intr, signed long timeout)
 			ret = -ERESTARTSYS;
 	}
 
-	if (!list_empty(&cb.base.node))
+	if (!list_empty(&cb.base.node)) {
+		decr_wait_count(fence, &cb.base);
 		list_del(&cb.base.node);
+	}
 	__set_current_state(TASK_RUNNING);
 
 out:
@@ -890,8 +935,8 @@ dma_fence_wait_any_timeout(struct dma_fence **fences, uint32_t count,
 		struct dma_fence *fence = fences[i];
 
 		cb[i].task = current;
-		if (dma_fence_add_callback(fence, &cb[i].base,
-					   dma_fence_default_wait_cb)) {
+		if (dma_fence_add_wait_callback(fence, &cb[i].base,
+						dma_fence_default_wait_cb)) {
 			/* This fence is already signaled */
 			if (idx)
 				*idx = i;
@@ -972,6 +1017,7 @@ dma_fence_init(struct dma_fence *fence, const struct dma_fence_ops *ops,
 	fence->context = context;
 	fence->seqno = seqno;
 	fence->flags = 0UL;
+	fence->waitcount = 0;
 	fence->error = 0;
 
 	trace_dma_fence_init(fence);
drivers/gpu/drm/i915/gt/intel_engine_pm.c +0 -1
index e971b153fda9..2693a0151a6b 100644
@@ -218,7 +218,6 @@ static bool switch_to_kernel_context(struct intel_engine_cs *engine)
 		 * until the background request retirement running every
 		 * second or two).
 		 */
-		BUILD_BUG_ON(sizeof(rq->duration) > sizeof(rq->submitq));
 		dma_fence_add_callback(&rq->fence, &rq->duration.cb, duration);
 		rq->duration.emitted = ktime_get();
 	}
include/linux/dma-fence.h +15 -0
index 35933e0ae62c..2b696f9de276 100644
@@ -92,6 +92,7 @@ struct dma_fence {
 	u64 seqno;
 	unsigned long flags;
 	struct kref refcount;
+	unsigned int waitcount;
 	int error;
 };
 
@@ -116,6 +117,11 @@ typedef void (*dma_fence_func_t)(struct dma_fence *fence,
 struct dma_fence_cb {
 	struct list_head node;
 	dma_fence_func_t func;
+	unsigned long flags;
+};
+
+enum dma_fence_cb_flag_bits {
+	DMA_FENCE_CB_FLAG_WAITCOUNT_BIT,
 };
 
 /**
@@ -381,6 +387,9 @@ signed long dma_fence_default_wait(struct dma_fence *fence,
 int dma_fence_add_callback(struct dma_fence *fence,
 			   struct dma_fence_cb *cb,
 			   dma_fence_func_t func);
+int dma_fence_add_wait_callback(struct dma_fence *fence,
+				struct dma_fence_cb *cb,
+				dma_fence_func_t func);
 bool dma_fence_remove_callback(struct dma_fence *fence,
 			       struct dma_fence_cb *cb);
 void dma_fence_enable_sw_signaling(struct dma_fence *fence);
@@ -532,6 +541,11 @@ static inline int dma_fence_get_status_locked(struct dma_fence *fence)
 
 int dma_fence_get_status(struct dma_fence *fence);
 
+static inline unsigned int dma_fence_wait_count(struct dma_fence *fence)
+{
+	return fence->waitcount;
+}
+
 /**
  * dma_fence_set_error - flag an error condition on the fence
  * @fence: the dma_fence
@@ -634,6 +648,7 @@ static inline void __dma_fence_cb_init(struct dma_fence_cb *cb,
 {
 	INIT_LIST_HEAD(&cb->node);
 	cb->func = func;
+	cb->flags = 0;
 }
 
 #endif /* __LINUX_DMA_FENCE_H */
Signature · 1 line
2.34.1
#6 lore raw

Re: [Intel-gfx] [RFC 5/9] dma-fence: Track explicit waiters

Quoted 240 lines · Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Track how many callers are explicity waiting on a fence to signal and allow querying that via new dma_fence_wait_count() API.

This provides infrastructure on top of which generic "waitboost" concepts can be implemented by individual drivers. Wait-boosting is any reactive activity, such as raising the GPU clocks, which happens while there are active external waiters.

---
 drivers/dma-buf/dma-fence.c               | 98 +++++++++++++++++------
 drivers/gpu/drm/i915/gt/intel_engine_pm.c |  1 -
 include/linux/dma-fence.h                 | 15 ++++
 3 files changed, 87 insertions(+), 27 deletions(-)
drivers/dma-buf/dma-fence.c +72 -26
index ea4a1f82c9bf..bdba5a8e21b1 100644
@@ -344,6 +344,25 @@ void __dma_fence_might_wait(void)
 }
 #endif
 
+static void incr_wait_count(struct dma_fence *fence, struct dma_fence_cb *cb)
+{
+       lockdep_assert_held(fence->lock);
+
+       __set_bit(DMA_FENCE_CB_FLAG_WAITCOUNT_BIT, &cb->flags);
+       fence->waitcount++;
+       WARN_ON_ONCE(!fence->waitcount);
+}
+
+static void decr_wait_count(struct dma_fence *fence, struct dma_fence_cb *cb)
+{
+       lockdep_assert_held(fence->lock);
+
+       if (__test_and_clear_bit(DMA_FENCE_CB_FLAG_WAITCOUNT_BIT, &cb->flags)) {
+               WARN_ON_ONCE(!fence->waitcount);
+               fence->waitcount--;
+       }
+}
+
 void __dma_fence_signal__timestamp(struct dma_fence *fence, ktime_t timestamp)
 {
        lockdep_assert_held(fence->lock);
@@ -363,6 +382,7 @@ __dma_fence_signal__notify(struct dma_fence *fence,
        lockdep_assert_held(fence->lock);
 
        list_for_each_entry_safe(cur, tmp, list, node) {
+               decr_wait_count(fence, cur);
                INIT_LIST_HEAD(&cur->node);
                cur->func(fence, cur);
        }
@@ -629,11 +649,44 @@ void dma_fence_enable_sw_signaling(struct dma_fence *fence)
        unsigned long flags;
 
        spin_lock_irqsave(fence->lock, flags);
+       fence->waitcount++;
+       WARN_ON_ONCE(!fence->waitcount);
        __dma_fence_enable_signaling(fence);
        spin_unlock_irqrestore(fence->lock, flags);
 }
 EXPORT_SYMBOL(dma_fence_enable_sw_signaling);
 
+static int add_callback(struct dma_fence *fence, struct dma_fence_cb *cb,
+                       dma_fence_func_t func, bool wait)
+{
+       unsigned long flags;
+       int ret = 0;
+
+       __dma_fence_cb_init(cb, func);
+
+       if (WARN_ON(!fence || !func))
+               return -EINVAL;
+
+       if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags))
+               return -ENOENT;
+
+       spin_lock_irqsave(fence->lock, flags);
+
+       if (wait)
+               incr_wait_count(fence, cb);
+
+       if (__dma_fence_enable_signaling(fence)) {
+               list_add_tail(&cb->node, &fence->cb_list);
+       } else {
+               decr_wait_count(fence, cb);
+               ret = -ENOENT;
+       }
+
+       spin_unlock_irqrestore(fence->lock, flags);
+
+       return ret;
+}
+
 /**
  * dma_fence_add_callback - add a callback to be called when the fence
  * is signaled
@@ -659,31 +712,18 @@ EXPORT_SYMBOL(dma_fence_enable_sw_signaling);
 int dma_fence_add_callback(struct dma_fence *fence, struct dma_fence_cb *cb,
                           dma_fence_func_t func)
 {
-       unsigned long flags;
-       int ret = 0;
-
-       __dma_fence_cb_init(cb, func);
-
-       if (WARN_ON(!fence || !func))
-               return -EINVAL;
-
-       if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags))
-               return -ENOENT;
-
-       spin_lock_irqsave(fence->lock, flags);
-
-       if (__dma_fence_enable_signaling(fence)) {
-               list_add_tail(&cb->node, &fence->cb_list);
-       } else {
-               ret = -ENOENT;
-       }
-
-       spin_unlock_irqrestore(fence->lock, flags);
-
-       return ret;
+       return add_callback(fence, cb, func, false);
 }
 EXPORT_SYMBOL(dma_fence_add_callback);
 
+int dma_fence_add_wait_callback(struct dma_fence *fence,
+                               struct dma_fence_cb *cb,
+                               dma_fence_func_t func)
+{
+       return add_callback(fence, cb, func, true);
+}
+EXPORT_SYMBOL(dma_fence_add_wait_callback);
+
 /**
  * dma_fence_get_status - returns the status upon completion
  * @fence: the dma_fence to query
@@ -736,8 +776,10 @@ dma_fence_remove_callback(struct dma_fence *fence, struct dma_fence_cb *cb)
        spin_lock_irqsave(fence->lock, flags);
 
        ret = !list_empty(&cb->node);
-       if (ret)
+       if (ret) {
+               decr_wait_count(fence, cb);
                list_del_init(&cb->node);
+       }
 
        spin_unlock_irqrestore(fence->lock, flags);
 
@@ -795,6 +837,7 @@ dma_fence_default_wait(struct dma_fence *fence, bool intr, signed long timeout)
 
        __dma_fence_cb_init(&cb.base, dma_fence_default_wait_cb);
        cb.task = current;
+       incr_wait_count(fence, &cb.base);
        list_add(&cb.base.node, &fence->cb_list);
 
        while (!test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags) && ret > 0) {
@@ -811,8 +854,10 @@ dma_fence_default_wait(struct dma_fence *fence, bool intr, signed long timeout)
                        ret = -ERESTARTSYS;
        }
 
-       if (!list_empty(&cb.base.node))
+       if (!list_empty(&cb.base.node)) {
+               decr_wait_count(fence, &cb.base);
                list_del(&cb.base.node);
+       }
        __set_current_state(TASK_RUNNING);
 
 out:
@@ -890,8 +935,8 @@ dma_fence_wait_any_timeout(struct dma_fence **fences, uint32_t count,
                struct dma_fence *fence = fences[i];
 
                cb[i].task = current;
-               if (dma_fence_add_callback(fence, &cb[i].base,
-                                          dma_fence_default_wait_cb)) {
+               if (dma_fence_add_wait_callback(fence, &cb[i].base,
+                                               dma_fence_default_wait_cb)) {
                        /* This fence is already signaled */
                        if (idx)
                                *idx = i;
@@ -972,6 +1017,7 @@ dma_fence_init(struct dma_fence *fence, const struct dma_fence_ops *ops,
        fence->context = context;
        fence->seqno = seqno;
        fence->flags = 0UL;
+       fence->waitcount = 0;
        fence->error = 0;
 
        trace_dma_fence_init(fence);
drivers/gpu/drm/i915/gt/intel_engine_pm.c +0 -1
index e971b153fda9..2693a0151a6b 100644
@@ -218,7 +218,6 @@ static bool switch_to_kernel_context(struct intel_engine_cs *engine)
                 * until the background request retirement running every
                 * second or two).
                 */
-               BUILD_BUG_ON(sizeof(rq->duration) > sizeof(rq->submitq));
                dma_fence_add_callback(&rq->fence, &rq->duration.cb, duration);
                rq->duration.emitted = ktime_get();
        }
include/linux/dma-fence.h +9 -0
index 35933e0ae62c..2b696f9de276 100644
@@ -92,6 +92,7 @@ struct dma_fence {
        u64 seqno;
        unsigned long flags;
        struct kref refcount;
+       unsigned int waitcount;
        int error;
 };
 
@@ -116,6 +117,11 @@ typedef void (*dma_fence_func_t)(struct dma_fence *fence,
 struct dma_fence_cb {
        struct list_head node;
        dma_fence_func_t func;
+       unsigned long flags;
+};
+
+enum dma_fence_cb_flag_bits {
+       DMA_FENCE_CB_FLAG_WAITCOUNT_BIT,
 };
 
 /**
@@ -381,6 +387,9 @@ signed long dma_fence_default_wait(struct dma_fence *fence,
 int dma_fence_add_callback(struct dma_fence *fence,
                           struct dma_fence_cb *cb,
                           dma_fence_func_t func);
+int dma_fence_add_wait_callback(struct dma_fence *fence,
+                               struct dma_fence_cb *cb,
+                               dma_fence_func_t func);
 bool dma_fence_remove_callback(struct dma_fence *fence,
                               struct dma_fence_cb *cb);
 void dma_fence_enable_sw_signaling(struct dma_fence *fence);

include/linux/dma-fence.h static inline int dma_fence_get_status_locked(struct dma_fence *fence) · line 547

Quoted 7 lines
include/linux/dma-fence.h +4 -0
@@ -532,6 +541,11 @@ static inline int dma_fence_get_status_locked(struct dma_fence *fence)
 
 int dma_fence_get_status(struct dma_fence *fence);
 
+static inline unsigned int dma_fence_wait_count(struct dma_fence *fence)
+{
+       return fence->waitcount;
+}

One thing I noticed while reviving my fence-deadline series is that this approach is not propagating through array and chain fences

BR,
-R

Quoted 15 lines
include/linux/dma-fence.h +2 -1
+
 /**
  * dma_fence_set_error - flag an error condition on the fence
  * @fence: the dma_fence
@@ -634,6 +648,7 @@ static inline void __dma_fence_cb_init(struct dma_fence_cb *cb,
 {
        INIT_LIST_HEAD(&cb->node);
        cb->func = func;
+       cb->flags = 0;
 }
 
 #endif /* __LINUX_DMA_FENCE_H */
--

2.34.1

#7 lore raw

Re: [Intel-gfx] [RFC 5/9] dma-fence: Track explicit waiters

Quoted 245 lines · Rob Clark
Quoted 243 lines · Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Track how many callers are explicity waiting on a fence to signal and allow querying that via new dma_fence_wait_count() API.

This provides infrastructure on top of which generic "waitboost" concepts can be implemented by individual drivers. Wait-boosting is any reactive activity, such as raising the GPU clocks, which happens while there are active external waiters.

---
  drivers/dma-buf/dma-fence.c               | 98 +++++++++++++++++------
  drivers/gpu/drm/i915/gt/intel_engine_pm.c |  1 -
  include/linux/dma-fence.h                 | 15 ++++
  3 files changed, 87 insertions(+), 27 deletions(-)
drivers/dma-buf/dma-fence.c +72 -26
index ea4a1f82c9bf..bdba5a8e21b1 100644
@@ -344,6 +344,25 @@ void __dma_fence_might_wait(void)
  }
  #endif
 
+static void incr_wait_count(struct dma_fence *fence, struct dma_fence_cb *cb)
+{
+       lockdep_assert_held(fence->lock);
+
+       __set_bit(DMA_FENCE_CB_FLAG_WAITCOUNT_BIT, &cb->flags);
+       fence->waitcount++;
+       WARN_ON_ONCE(!fence->waitcount);
+}
+
+static void decr_wait_count(struct dma_fence *fence, struct dma_fence_cb *cb)
+{
+       lockdep_assert_held(fence->lock);
+
+       if (__test_and_clear_bit(DMA_FENCE_CB_FLAG_WAITCOUNT_BIT, &cb->flags)) {
+               WARN_ON_ONCE(!fence->waitcount);
+               fence->waitcount--;
+       }
+}
+
  void __dma_fence_signal__timestamp(struct dma_fence *fence, ktime_t timestamp)
  {
         lockdep_assert_held(fence->lock);
@@ -363,6 +382,7 @@ __dma_fence_signal__notify(struct dma_fence *fence,
         lockdep_assert_held(fence->lock);
 
         list_for_each_entry_safe(cur, tmp, list, node) {
+               decr_wait_count(fence, cur);
                 INIT_LIST_HEAD(&cur->node);
                 cur->func(fence, cur);
         }
@@ -629,11 +649,44 @@ void dma_fence_enable_sw_signaling(struct dma_fence *fence)
         unsigned long flags;
 
         spin_lock_irqsave(fence->lock, flags);
+       fence->waitcount++;
+       WARN_ON_ONCE(!fence->waitcount);
         __dma_fence_enable_signaling(fence);
         spin_unlock_irqrestore(fence->lock, flags);
  }
  EXPORT_SYMBOL(dma_fence_enable_sw_signaling);
 
+static int add_callback(struct dma_fence *fence, struct dma_fence_cb *cb,
+                       dma_fence_func_t func, bool wait)
+{
+       unsigned long flags;
+       int ret = 0;
+
+       __dma_fence_cb_init(cb, func);
+
+       if (WARN_ON(!fence || !func))
+               return -EINVAL;
+
+       if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags))
+               return -ENOENT;
+
+       spin_lock_irqsave(fence->lock, flags);
+
+       if (wait)
+               incr_wait_count(fence, cb);
+
+       if (__dma_fence_enable_signaling(fence)) {
+               list_add_tail(&cb->node, &fence->cb_list);
+       } else {
+               decr_wait_count(fence, cb);
+               ret = -ENOENT;
+       }
+
+       spin_unlock_irqrestore(fence->lock, flags);
+
+       return ret;
+}
+
  /**
   * dma_fence_add_callback - add a callback to be called when the fence
   * is signaled
@@ -659,31 +712,18 @@ EXPORT_SYMBOL(dma_fence_enable_sw_signaling);
  int dma_fence_add_callback(struct dma_fence *fence, struct dma_fence_cb *cb,
                            dma_fence_func_t func)
  {
-       unsigned long flags;
-       int ret = 0;
-
-       __dma_fence_cb_init(cb, func);
-
-       if (WARN_ON(!fence || !func))
-               return -EINVAL;
-
-       if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags))
-               return -ENOENT;
-
-       spin_lock_irqsave(fence->lock, flags);
-
-       if (__dma_fence_enable_signaling(fence)) {
-               list_add_tail(&cb->node, &fence->cb_list);
-       } else {
-               ret = -ENOENT;
-       }
-
-       spin_unlock_irqrestore(fence->lock, flags);
-
-       return ret;
+       return add_callback(fence, cb, func, false);
  }
  EXPORT_SYMBOL(dma_fence_add_callback);
 
+int dma_fence_add_wait_callback(struct dma_fence *fence,
+                               struct dma_fence_cb *cb,
+                               dma_fence_func_t func)
+{
+       return add_callback(fence, cb, func, true);
+}
+EXPORT_SYMBOL(dma_fence_add_wait_callback);
+
  /**
   * dma_fence_get_status - returns the status upon completion
   * @fence: the dma_fence to query
@@ -736,8 +776,10 @@ dma_fence_remove_callback(struct dma_fence *fence, struct dma_fence_cb *cb)
         spin_lock_irqsave(fence->lock, flags);
 
         ret = !list_empty(&cb->node);
-       if (ret)
+       if (ret) {
+               decr_wait_count(fence, cb);
                 list_del_init(&cb->node);
+       }
 
         spin_unlock_irqrestore(fence->lock, flags);
 
@@ -795,6 +837,7 @@ dma_fence_default_wait(struct dma_fence *fence, bool intr, signed long timeout)
 
         __dma_fence_cb_init(&cb.base, dma_fence_default_wait_cb);
         cb.task = current;
+       incr_wait_count(fence, &cb.base);
         list_add(&cb.base.node, &fence->cb_list);
 
         while (!test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags) && ret > 0) {
@@ -811,8 +854,10 @@ dma_fence_default_wait(struct dma_fence *fence, bool intr, signed long timeout)
                         ret = -ERESTARTSYS;
         }
 
-       if (!list_empty(&cb.base.node))
+       if (!list_empty(&cb.base.node)) {
+               decr_wait_count(fence, &cb.base);
                 list_del(&cb.base.node);
+       }
         __set_current_state(TASK_RUNNING);
 
  out:
@@ -890,8 +935,8 @@ dma_fence_wait_any_timeout(struct dma_fence **fences, uint32_t count,
                 struct dma_fence *fence = fences[i];
 
                 cb[i].task = current;
-               if (dma_fence_add_callback(fence, &cb[i].base,
-                                          dma_fence_default_wait_cb)) {
+               if (dma_fence_add_wait_callback(fence, &cb[i].base,
+                                               dma_fence_default_wait_cb)) {
                         /* This fence is already signaled */
                         if (idx)
                                 *idx = i;
@@ -972,6 +1017,7 @@ dma_fence_init(struct dma_fence *fence, const struct dma_fence_ops *ops,
         fence->context = context;
         fence->seqno = seqno;
         fence->flags = 0UL;
+       fence->waitcount = 0;
         fence->error = 0;
 
         trace_dma_fence_init(fence);
drivers/gpu/drm/i915/gt/intel_engine_pm.c +0 -1
index e971b153fda9..2693a0151a6b 100644
@@ -218,7 +218,6 @@ static bool switch_to_kernel_context(struct intel_engine_cs *engine)
                  * until the background request retirement running every
                  * second or two).
                  */
-               BUILD_BUG_ON(sizeof(rq->duration) > sizeof(rq->submitq));
                 dma_fence_add_callback(&rq->fence, &rq->duration.cb, duration);
                 rq->duration.emitted = ktime_get();
         }
include/linux/dma-fence.h +9 -0
index 35933e0ae62c..2b696f9de276 100644
@@ -92,6 +92,7 @@ struct dma_fence {
         u64 seqno;
         unsigned long flags;
         struct kref refcount;
+       unsigned int waitcount;
         int error;
  };
 
@@ -116,6 +117,11 @@ typedef void (*dma_fence_func_t)(struct dma_fence *fence,
  struct dma_fence_cb {
         struct list_head node;
         dma_fence_func_t func;
+       unsigned long flags;
+};
+
+enum dma_fence_cb_flag_bits {
+       DMA_FENCE_CB_FLAG_WAITCOUNT_BIT,
  };
 
  /**
@@ -381,6 +387,9 @@ signed long dma_fence_default_wait(struct dma_fence *fence,
  int dma_fence_add_callback(struct dma_fence *fence,
                            struct dma_fence_cb *cb,
                            dma_fence_func_t func);
+int dma_fence_add_wait_callback(struct dma_fence *fence,
+                               struct dma_fence_cb *cb,
+                               dma_fence_func_t func);
  bool dma_fence_remove_callback(struct dma_fence *fence,
                                struct dma_fence_cb *cb);
  void dma_fence_enable_sw_signaling(struct dma_fence *fence);
@@ -532,6 +541,11 @@ static inline int dma_fence_get_status_locked(struct dma_fence *fence)
 
  int dma_fence_get_status(struct dma_fence *fence);
 
Quoted 7 lines

include/linux/dma-fence.h static inline int dma_fence_get_status_locked(struct dma_fence *fence) · line 547

Quoted 4 lines
include/linux/dma-fence.h +4 -0
+static inline unsigned int dma_fence_wait_count(struct dma_fence *fence)
+{
+       return fence->waitcount;
+}

One thing I noticed while reviving my fence-deadline series is that this approach is not propagating through array and chain fences

True, thanks.

So I'd need a way to "inherit" the waitcount (and so complete the semi-OO) in both enable_signaling callbacks. Not sure if it would be a problem for the dma_fence_chain_enable_signaling since it currently appears to be only enabling signalling on the last of the chain. Maybe walking all and enabling sw signalling on all but last (which has the callback) might work.

But anyway, I'll hold off re-spinning for this until the fate of the series is clear.

Regards,

Tvrtko

Quoted 19 lines

BR,
-R

Quoted 15 lines
include/linux/dma-fence.h +2 -1
+
  /**
   * dma_fence_set_error - flag an error condition on the fence
   * @fence: the dma_fence
@@ -634,6 +648,7 @@ static inline void __dma_fence_cb_init(struct dma_fence_cb *cb,
  {
         INIT_LIST_HEAD(&cb->node);
         cb->func = func;
+       cb->flags = 0;
  }
 
  #endif /* __LINUX_DMA_FENCE_H */
--

2.34.1

#8 lore raw

RFC v3 6/9 drm/syncobj: Mark syncobj waits as external waiters

In reply to Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Use the previously added dma-fence tracking of explicit waiters.

---
 drivers/gpu/drm/drm_syncobj.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/drm_syncobj.c +3 -3
index 0c2be8360525..776b90774a64 100644
@@ -1065,9 +1065,9 @@ static signed long drm_syncobj_array_wait_timeout(struct drm_syncobj **syncobjs,
 			if ((flags & DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE) ||
 			    dma_fence_is_signaled(fence) ||
 			    (!entries[i].fence_cb.func &&
-			     dma_fence_add_callback(fence,
-						    &entries[i].fence_cb,
-						    syncobj_wait_fence_func))) {
+			     dma_fence_add_wait_callback(fence,
+							 &entries[i].fence_cb,
+							 syncobj_wait_fence_func))) {
 				/* The fence has been signaled */
 				if (flags & DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL) {
 					signaled_count++;
Signature · 1 line
2.34.1
#9 lore raw

Re: [Intel-gfx] [RFC 6/9] drm/syncobj: Mark syncobj waits as external waiters

Quoted 15 lines · Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Use the previously added dma-fence tracking of explicit waiters.

---
 drivers/gpu/drm/drm_syncobj.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/drm_syncobj.c +0 -0
index 0c2be8360525..776b90774a64 100644

drivers/gpu/drm/drm_syncobj.c static signed long drm_syncobj_array_wait_timeout(struct drm_syncobj **syncobjs, · line 1070

Quoted 9 lines
drivers/gpu/drm/drm_syncobj.c +3 -3
@@ -1065,9 +1065,9 @@ static signed long drm_syncobj_array_wait_timeout(struct drm_syncobj **syncobjs,
                        if ((flags & DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE) ||
                            dma_fence_is_signaled(fence) ||
                            (!entries[i].fence_cb.func &&
-                            dma_fence_add_callback(fence,
-                                                   &entries[i].fence_cb,
-                                                   syncobj_wait_fence_func))) {
+                            dma_fence_add_wait_callback(fence,
+                                                        &entries[i].fence_cb,
+                                                        syncobj_wait_fence_func))) {

I think this isn't really what you want if count > 1, because you wouldn't be notifying the fence signaler of fence n+1 until the wait on fence n completed

BR,
-R

Quoted 6 lines
drivers/gpu/drm/drm_syncobj.c +0 -1
                                /* The fence has been signaled */
                                if (flags & DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL) {
                                        signaled_count++;
--

2.34.1

#10 lore raw

Re: [Intel-gfx] [RFC 6/9] drm/syncobj: Mark syncobj waits as external waiters

Quoted 22 lines · Rob Clark
Quoted 20 lines · Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Use the previously added dma-fence tracking of explicit waiters.

---
  drivers/gpu/drm/drm_syncobj.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/drm_syncobj.c +0 -2
index 0c2be8360525..776b90774a64 100644
@@ -1065,9 +1065,9 @@ static signed long drm_syncobj_array_wait_timeout(struct drm_syncobj **syncobjs,
                         if ((flags & DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE) ||
                             dma_fence_is_signaled(fence) ||
                             (!entries[i].fence_cb.func &&
-                            dma_fence_add_callback(fence,
-                                                   &entries[i].fence_cb,
Quoted 8 lines

drivers/gpu/drm/drm_syncobj.c static signed long drm_syncobj_array_wait_timeout(struct drm_syncobj **syncobjs, · line 1070

Quoted 4 lines
drivers/gpu/drm/drm_syncobj.c +3 -1
-                                                   syncobj_wait_fence_func))) {
+                            dma_fence_add_wait_callback(fence,
+                                                        &entries[i].fence_cb,
+                                                        syncobj_wait_fence_func))) {

I think this isn't really what you want if count > 1, because you wouldn't be notifying the fence signaler of fence n+1 until the wait on fence n completed

Are you sure? After some staring all I can see is that all callbacks are added before the first sleep.

Regards,

Tvrtko

#11 lore raw

Re: [Intel-gfx] [RFC 6/9] drm/syncobj: Mark syncobj waits as external waiters

Quoted 34 lines · Tvrtko Ursulin
Quoted 22 lines · Rob Clark
Quoted 20 lines · Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Use the previously added dma-fence tracking of explicit waiters.

---
  drivers/gpu/drm/drm_syncobj.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/drm_syncobj.c +0 -2
index 0c2be8360525..776b90774a64 100644
@@ -1065,9 +1065,9 @@ static signed long drm_syncobj_array_wait_timeout(struct drm_syncobj **syncobjs,
                         if ((flags & DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE) ||
                             dma_fence_is_signaled(fence) ||
                             (!entries[i].fence_cb.func &&
-                            dma_fence_add_callback(fence,
-                                                   &entries[i].fence_cb,
Quoted 8 lines

drivers/gpu/drm/drm_syncobj.c static signed long drm_syncobj_array_wait_timeout(struct drm_syncobj **syncobjs, · line 1070

Quoted 4 lines
drivers/gpu/drm/drm_syncobj.c +3 -1
-                                                   syncobj_wait_fence_func))) {
+                            dma_fence_add_wait_callback(fence,
+                                                        &entries[i].fence_cb,
+                                                        syncobj_wait_fence_func))) {

I think this isn't really what you want if count > 1, because you wouldn't be notifying the fence signaler of fence n+1 until the wait on fence n completed

Quoted 2 lines

Are you sure? After some staring all I can see is that all callbacks are added before the first sleep.

Ahh, yes, you are right

BR,
-R

#12 lore raw

RFC v3 7/9 drm/i915: Waitboost external waits

In reply to Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Userspace waits coming via the drm_syncobj route have so far been bypassing the waitboost mechanism.

Use the previously added dma-fence wait tracking API and apply the same waitboosting logic which applies to other entry points.

This should fix the perfomance regressions experience by clvk and similar userspace which relies on drm_syncobj.

---
 drivers/gpu/drm/i915/i915_request.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_request.c +6 -1
index 7503dcb9043b..8989f62a7fba 100644
@@ -94,7 +94,12 @@ static bool i915_fence_signaled(struct dma_fence *fence)
 
 static bool i915_fence_enable_signaling(struct dma_fence *fence)
 {
-	return i915_request_enable_breadcrumb(to_request(fence));
+	struct i915_request *rq = to_request(fence);
+
+	if (dma_fence_wait_count(&rq->fence) && !i915_request_started(rq))
+		intel_rps_boost(rq);
+
+	return i915_request_enable_breadcrumb(rq);
 }
 
 static signed long i915_fence_wait(struct dma_fence *fence,
Signature · 1 line
2.34.1
#13 lore raw

RFC v3 8/9 drm/i915: Mark waits as explicit

In reply to Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Use the previously added dma-fence API to mark the direct i915 waits as explicit. This has no significant effect apart from following the new pattern.

---
 drivers/gpu/drm/i915/i915_request.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_request.c +2 -1
index 8989f62a7fba..488b180f8821 100644
@@ -2046,7 +2046,8 @@ long i915_request_wait_timeout(struct i915_request *rq,
 		intel_rps_boost(rq);
 
 	wait.tsk = current;
-	if (dma_fence_add_callback(&rq->fence, &wait.cb, request_wait_wake))
+	if (dma_fence_add_wait_callback(&rq->fence, &wait.cb,
+					request_wait_wake))
 		goto out;
 
 	/*
Signature · 1 line
2.34.1
#14 lore raw

RFC v3 9/9 drm/i915: Wait boost requests waited upon by others

In reply to Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Use the newly added dma-fence API to apply waitboost not only requests which have been marked with I915_WAIT_PRIORITY by i915, but which may be waited upon by others (such as for instance buffer sharing in multi-GPU scenarios).

---
 drivers/gpu/drm/i915/i915_request.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_request.c +2 -1
index 488b180f8821..e24fac5c1567 100644
@@ -2042,7 +2042,8 @@ long i915_request_wait_timeout(struct i915_request *rq,
 	 * but at a cost of spending more power processing the workload
 	 * (bad for battery).
 	 */
-	if (flags & I915_WAIT_PRIORITY && !i915_request_started(rq))
+	if (((flags & I915_WAIT_PRIORITY) || dma_fence_wait_count(&rq->fence))
+	    && !i915_request_started(rq))
 		intel_rps_boost(rq);
 
 	wait.tsk = current;
Signature · 1 line
2.34.1
#15 lore raw
In reply to Tvrtko Ursulin
Quoted 19 lines · Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

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. AFAIU this mostly happens with all Vulkan based userspaces. Hence I cooked up this mini series to see if discussion about restoring the waitboost can be had.

The series adds a concept of "wait count" to dma fence which is intended to represent explicit userspace waits. It is therefore 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.

Quoted 6 lines

Patch has been slightly tested for performance impact by Google using some clvk workloads and shows a good improvement (frame time improved from 16ms to 13ms).

It is also important to mention that benefits of waitboosting are not only about workloads related to frame presentation time, but also for serialized computations which constantly move between the CPU and GPU.

I think this should be integrated with https://lore.kernel.org/all/[email protected]/
so that we have one overall approach here that works for all drivers.
Obviously should include support for all interested parties.
-Daniel

Quoted 38 lines

*)
https://gitlab.freedesktop.org/drm/intel/-/issues/8014

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.

v3:
* Handle drivers which open-code callback additions.

Tvrtko Ursulin (9):
dma-fence: Move i915 helpers into common
dma-fence: Add callback initialization helper drm/i915: Use fence callback initialization helper drm/vmwgfx: Use fence callback initialization helper
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                 | 137 ++++++++++++++------
 drivers/gpu/drm/drm_syncobj.c               |   6 +-
 drivers/gpu/drm/i915/gt/intel_breadcrumbs.c |  22 ----
 drivers/gpu/drm/i915/gt/intel_engine_pm.c   |   1 -
 drivers/gpu/drm/i915/i915_active.c          |   2 +-
 drivers/gpu/drm/i915/i915_active.h          |   2 +-
 drivers/gpu/drm/i915/i915_request.c         |  13 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c       |   2 +-
 include/linux/dma-fence.h                   |  26 ++++
 9 files changed, 141 insertions(+), 70 deletions(-)
Signature · 1 line
2.34.1
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
#17 lore raw

[Intel-gfx] ✓ Fi.CI.BAT: success for Waitboost drm syncobj waits (rev3)

In reply to Tvrtko Ursulin
== Series Details ==

== Series Details ==

Series: Waitboost drm syncobj waits (rev3)
URL : https://patchwork.freedesktop.org/series/113846/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12748 -> Patchwork_113846v3
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/index.html

Participating hosts (39 -> 37)
------------------------------

Missing (2): fi-snb-2520m fi-pnv-d510

Known issues
------------

Here are the changes found in Patchwork_113846v3 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@i915_selftest@live@gt_pm:
- bat-rpls-2: [PASS][1] -> [DMESG-FAIL][2] ([i915#4258])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12748/bat-rpls-2/igt@i915_selftest@live@gt_pm.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/bat-rpls-2/igt@i915_selftest@live@gt_pm.html

* igt@i915_selftest@live@slpc:
- bat-rpls-2: NOTRUN -> [DMESG-FAIL][3] ([i915#6997])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/bat-rpls-2/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@workarounds:
- bat-adlp-9: [PASS][4] -> [INCOMPLETE][5] ([i915#4983] / [i915#7677])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12748/bat-adlp-9/igt@i915_selftest@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/bat-adlp-9/igt@i915_selftest@[email protected]

* igt@kms_chamelium_hpd@common-hpd-after-suspend:
- bat-rpls-2: NOTRUN -> [SKIP][6] ([i915#7828])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/bat-rpls-2/igt@[email protected]
- bat-dg2-11: NOTRUN -> [SKIP][7] ([i915#7828])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/bat-dg2-11/igt@[email protected]

* igt@kms_pipe_crc_basic@suspend-read-crc:
- bat-rpls-2: NOTRUN -> [SKIP][8] ([i915#1845])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/bat-rpls-2/igt@[email protected]
- bat-dg2-11: NOTRUN -> [SKIP][9] ([i915#5354])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/bat-dg2-11/igt@[email protected]

#### Possible fixes ####

* igt@i915_selftest@live@hangcheck:
- bat-dg2-11: [ABORT][10] ([i915#7913]) -> [PASS][11]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12748/bat-dg2-11/igt@i915_selftest@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/bat-dg2-11/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@reset:
- bat-rpls-2: [ABORT][12] ([i915#4983]) -> [PASS][13]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12748/bat-rpls-2/igt@i915_selftest@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/bat-rpls-2/igt@i915_selftest@[email protected]

#### Warnings ####

* igt@i915_selftest@live@slpc:
- bat-rpls-1: [DMESG-FAIL][14] ([i915#6367] / [i915#7996]) -> [DMESG-FAIL][15] ([i915#6367])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12748/bat-rpls-1/igt@i915_selftest@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/bat-rpls-1/igt@i915_selftest@[email protected]

[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#4258]: https://gitlab.freedesktop.org/drm/intel/issues/4258
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
[i915#6997]: https://gitlab.freedesktop.org/drm/intel/issues/6997
[i915#7677]: https://gitlab.freedesktop.org/drm/intel/issues/7677
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
[i915#7996]: https://gitlab.freedesktop.org/drm/intel/issues/7996

Build changes
-------------

* Linux: CI_DRM_12748 -> Patchwork_113846v3

CI-20190529: 20190529
CI_DRM_12748: 2d71e322ff387f05855e797efc6ccaf61dc4b80d @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7160: 45da871dd2684227e93a2fc002b87dfc58bd5fd9 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_113846v3: 2d71e322ff387f05855e797efc6ccaf61dc4b80d @ git://anongit.freedesktop.org/gfx-ci/linux

### Linux commits

de13e92dbb63 drm/i915: Wait boost requests waited upon by others 8fd6cf0d3d8d drm/i915: Mark waits as explicit b4a1574d7d64 drm/i915: Waitboost external waits 8c8a99182a27 drm/syncobj: Mark syncobj waits as external waiters 0c08c896fcb9 dma-fence: Track explicit waiters ab78eaad2d71 drm/vmwgfx: Use fence callback initialization helper 00211712d1a9 drm/i915: Use fence callback initialization helper 4b35435a888c dma-fence: Add callback initialization helper 842e57342001 dma-fence: Move i915 helpers into common

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/index.html

#18 lore raw

[Intel-gfx] ✓ Fi.CI.IGT: success for Waitboost drm syncobj waits (rev3)

In reply to Tvrtko Ursulin
== Series Details ==

== Series Details ==

Series: Waitboost drm syncobj waits (rev3)
URL : https://patchwork.freedesktop.org/series/113846/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12748_full -> Patchwork_113846v3_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

Participating hosts (11 -> 10)
------------------------------

Missing (1): shard-rkl0

Known issues
------------

Here are the changes found in Patchwork_113846v3_full that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_fair@basic-none-solo@rcs0:
- shard-apl: [PASS][1] -> [FAIL][2] ([i915#2842])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12748/shard-apl6/igt@gem_exec_fair@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/shard-apl3/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-pace-share@rcs0:
- shard-glk: [PASS][3] -> [FAIL][4] ([i915#2842])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12748/shard-glk6/igt@gem_exec_fair@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/shard-glk1/igt@gem_exec_fair@[email protected]

* igt@kms_plane_scaling@planes-upscale-factor-0-25-downscale-factor-0-5@pipe-a-hdmi-a-1:
- shard-snb: NOTRUN -> [SKIP][5] ([fdo#109271]) +37 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/shard-snb1/igt@kms_plane_scaling@planes-upscale-factor-0-25-downscale-factor-0-5@pipe-a-hdmi-a-1.html

#### Possible fixes ####

* igt@drm_fdinfo@virtual-idle:
- {shard-rkl}: [FAIL][6] ([i915#7742]) -> [PASS][7]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12748/shard-rkl-1/igt@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/shard-rkl-5/igt@[email protected]

* igt@gem_eio@reset-stress:
- {shard-dg1}: [FAIL][8] ([i915#5784]) -> [PASS][9]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12748/shard-dg1-13/igt@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/shard-dg1-17/igt@[email protected]

* igt@gem_exec_balancer@fairslice:
- {shard-rkl}: [SKIP][10] ([i915#6259]) -> [PASS][11]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12748/shard-rkl-5/igt@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/shard-rkl-2/igt@[email protected]

* igt@gem_exec_reloc@basic-write-read-noreloc:
- {shard-rkl}: [SKIP][12] ([i915#3281]) -> [PASS][13] +10 similar issues
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12748/shard-rkl-1/igt@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/shard-rkl-5/igt@[email protected]

* igt@gem_partial_pwrite_pread@writes-after-reads-uncached:
- {shard-rkl}: [SKIP][14] ([i915#3282]) -> [PASS][15] +4 similar issues
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12748/shard-rkl-2/igt@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/shard-rkl-5/igt@[email protected]

* igt@gen9_exec_parse@bb-start-param:
- {shard-rkl}: [SKIP][16] ([i915#2527]) -> [PASS][17] +3 similar issues
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12748/shard-rkl-1/igt@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/shard-rkl-5/igt@[email protected]

* igt@i915_pm_dc@dc9-dpms:
- {shard-rkl}: [SKIP][18] ([i915#4281]) -> [PASS][19]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12748/shard-rkl-6/igt@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/shard-rkl-2/igt@[email protected]

* igt@i915_pm_rpm@dpms-mode-unset-lpsp:
- {shard-dg1}: [SKIP][20] ([i915#1397]) -> [PASS][21]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12748/shard-dg1-18/igt@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/shard-dg1-14/igt@[email protected]

* igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-180-async-flip:
- {shard-rkl}: [SKIP][22] ([i915#1845] / [i915#4098]) -> [PASS][23] +14 similar issues
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12748/shard-rkl-3/igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-180-async-flip.html
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/shard-rkl-6/igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-180-async-flip.html

* igt@kms_big_fb@y-tiled-32bpp-rotate-0:
- {shard-dg1}: [DMESG-WARN][24] -> [PASS][25] +2 similar issues
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12748/shard-dg1-15/igt@[email protected]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/shard-dg1-18/igt@[email protected]

* igt@kms_cursor_legacy@flip-vs-cursor@atomic-transitions:
- shard-apl: [FAIL][26] ([i915#2346]) -> [PASS][27]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12748/shard-apl4/igt@kms_cursor_legacy@[email protected]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/shard-apl4/igt@kms_cursor_legacy@[email protected]

* igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@bc-hdmi-a1-hdmi-a2:
- shard-glk: [FAIL][28] ([i915#79]) -> [PASS][29]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12748/shard-glk3/igt@kms_flip@[email protected]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/shard-glk9/igt@kms_flip@[email protected]

* igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-shrfb-draw-blt:
- {shard-rkl}: [SKIP][30] ([i915#1849] / [i915#4098]) -> [PASS][31] +10 similar issues
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12748/shard-rkl-3/igt@[email protected]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/shard-rkl-6/igt@[email protected]

* igt@kms_plane@plane-panning-bottom-right-suspend@pipe-a-planes:
- {shard-rkl}: [SKIP][32] ([i915#1849]) -> [PASS][33] +4 similar issues
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12748/shard-rkl-2/igt@kms_plane@[email protected]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/shard-rkl-6/igt@kms_plane@[email protected]

* igt@kms_psr@sprite_mmap_cpu:
- {shard-rkl}: [SKIP][34] ([i915#1072]) -> [PASS][35]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12748/shard-rkl-3/igt@kms_psr@sprite_mmap_cpu.html
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/shard-rkl-6/igt@kms_psr@sprite_mmap_cpu.html

* igt@kms_universal_plane@disable-primary-vs-flip-pipe-b:
- {shard-rkl}: [SKIP][36] ([i915#1845] / [i915#4070] / [i915#4098]) -> [PASS][37]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12748/shard-rkl-2/igt@[email protected]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/shard-rkl-6/igt@[email protected]

* igt@perf@mi-rpc:
- {shard-rkl}: [SKIP][38] ([i915#2434]) -> [PASS][39]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12748/shard-rkl-2/igt@[email protected]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/shard-rkl-5/igt@[email protected]

* igt@perf@polling-small-buf:
- {shard-rkl}: [FAIL][40] ([i915#1722]) -> [PASS][41]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12748/shard-rkl-3/igt@[email protected]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/shard-rkl-6/igt@[email protected]

* igt@prime_vgem@basic-read:
- {shard-rkl}: [SKIP][42] ([fdo#109295] / [i915#3291] / [i915#3708]) -> [PASS][43]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12748/shard-rkl-1/igt@[email protected]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/shard-rkl-5/igt@[email protected]

* igt@testdisplay:
- {shard-rkl}: [SKIP][44] ([i915#4098]) -> [PASS][45] +2 similar issues
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12748/shard-rkl-3/[email protected]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/shard-rkl-6/[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
[fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
[fdo#109283]: https://bugs.freedesktop.org/show_bug.cgi?id=109283
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[fdo#109302]: https://bugs.freedesktop.org/show_bug.cgi?id=109302
[fdo#109303]: https://bugs.freedesktop.org/show_bug.cgi?id=109303
[fdo#109307]: https://bugs.freedesktop.org/show_bug.cgi?id=109307
[fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309
[fdo#109313]: https://bugs.freedesktop.org/show_bug.cgi?id=109313
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
[fdo#110723]: https://bugs.freedesktop.org/show_bug.cgi?id=110723
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#111614]: https://bugs.freedesktop.org/show_bug.cgi?id=111614
[fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
[fdo#111644]: https://bugs.freedesktop.org/show_bug.cgi?id=111644
[fdo#111656]: https://bugs.freedesktop.org/show_bug.cgi?id=111656
[fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[fdo#112283]: https://bugs.freedesktop.org/show_bug.cgi?id=112283
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#132]: https://gitlab.freedesktop.org/drm/intel/issues/132
[i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
[i915#1722]: https://gitlab.freedesktop.org/drm/intel/issues/1722
[i915#1755]: https://gitlab.freedesktop.org/drm/intel/issues/1755
[i915#1825]: https://gitlab.freedesktop.org/drm/intel/issues/1825
[i915#1839]: https://gitlab.freedesktop.org/drm/intel/issues/1839
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
[i915#2434]: https://gitlab.freedesktop.org/drm/intel/issues/2434
[i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
[i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
[i915#2532]: https://gitlab.freedesktop.org/drm/intel/issues/2532
[i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
[i915#2658]: https://gitlab.freedesktop.org/drm/intel/issues/2658
[i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
[i915#2681]: https://gitlab.freedesktop.org/drm/intel/issues/2681
[i915#280]: https://gitlab.freedesktop.org/drm/intel/issues/280
[i915#284]: https://gitlab.freedesktop.org/drm/intel/issues/284
[i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
[i915#2856]: https://gitlab.freedesktop.org/drm/intel/issues/2856
[i915#2920]: https://gitlab.freedesktop.org/drm/intel/issues/2920
[i915#3116]: https://gitlab.freedesktop.org/drm/intel/issues/3116
[i915#315]: https://gitlab.freedesktop.org/drm/intel/issues/315
[i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
[i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
[i915#3299]: https://gitlab.freedesktop.org/drm/intel/issues/3299
[i915#3323]: https://gitlab.freedesktop.org/drm/intel/issues/3323
[i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359
[i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458
[i915#3539]: https://gitlab.freedesktop.org/drm/intel/issues/3539
[i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3558]: https://gitlab.freedesktop.org/drm/intel/issues/3558
[i915#3591]: https://gitlab.freedesktop.org/drm/intel/issues/3591
[i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
[i915#3638]: https://gitlab.freedesktop.org/drm/intel/issues/3638
[i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#3734]: https://gitlab.freedesktop.org/drm/intel/issues/3734
[i915#3826]: https://gitlab.freedesktop.org/drm/intel/issues/3826
[i915#3840]: https://gitlab.freedesktop.org/drm/intel/issues/3840
[i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
[i915#3955]: https://gitlab.freedesktop.org/drm/intel/issues/3955
[i915#4070]: https://gitlab.freedesktop.org/drm/intel/issues/4070
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4215]: https://gitlab.freedesktop.org/drm/intel/issues/4215
[i915#4258]: https://gitlab.freedesktop.org/drm/intel/issues/4258
[i915#426]: https://gitlab.freedesktop.org/drm/intel/issues/426
[i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
[i915#4281]: https://gitlab.freedesktop.org/drm/intel/issues/4281
[i915#4391]: https://gitlab.freedesktop.org/drm/intel/issues/4391
[i915#4538]: https://gitlab.freedesktop.org/drm/intel/issues/4538
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4771]: https://gitlab.freedesktop.org/drm/intel/issues/4771
[i915#4812]: https://gitlab.freedesktop.org/drm/intel/issues/4812
[i915#4833]: https://gitlab.freedesktop.org/drm/intel/issues/4833
[i915#4852]: https://gitlab.freedesktop.org/drm/intel/issues/4852
[i915#4854]: https://gitlab.freedesktop.org/drm/intel/issues/4854
[i915#4879]: https://gitlab.freedesktop.org/drm/intel/issues/4879
[i915#4881]: https://gitlab.freedesktop.org/drm/intel/issues/4881
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5122]: https://gitlab.freedesktop.org/drm/intel/issues/5122
[i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
[i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
[i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
[i915#5289]: https://gitlab.freedesktop.org/drm/intel/issues/5289
[i915#5325]: https://gitlab.freedesktop.org/drm/intel/issues/5325
[i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
[i915#5439]: https://gitlab.freedesktop.org/drm/intel/issues/5439
[i915#5461]: https://gitlab.freedesktop.org/drm/intel/issues/5461
[i915#5563]: https://gitlab.freedesktop.org/drm/intel/issues/5563
[i915#5784]: https://gitlab.freedesktop.org/drm/intel/issues/5784
[i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
[i915#6117]: https://gitlab.freedesktop.org/drm/intel/issues/6117
[i915#6230]: https://gitlab.freedesktop.org/drm/intel/issues/6230
[i915#6245]: https://gitlab.freedesktop.org/drm/intel/issues/6245
[i915#6247]: https://gitlab.freedesktop.org/drm/intel/issues/6247
[i915#6248]: https://gitlab.freedesktop.org/drm/intel/issues/6248
[i915#6259]: https://gitlab.freedesktop.org/drm/intel/issues/6259
[i915#6301]: https://gitlab.freedesktop.org/drm/intel/issues/6301
[i915#6334]: https://gitlab.freedesktop.org/drm/intel/issues/6334
[i915#6335]: https://gitlab.freedesktop.org/drm/intel/issues/6335
[i915#6433]: https://gitlab.freedesktop.org/drm/intel/issues/6433
[i915#6497]: https://gitlab.freedesktop.org/drm/intel/issues/6497
[i915#6524]: https://gitlab.freedesktop.org/drm/intel/issues/6524
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#6768]: https://gitlab.freedesktop.org/drm/intel/issues/6768
[i915#6944]: https://gitlab.freedesktop.org/drm/intel/issues/6944
[i915#6946]: https://gitlab.freedesktop.org/drm/intel/issues/6946
[i915#6953]: https://gitlab.freedesktop.org/drm/intel/issues/6953
[i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116
[i915#7118]: https://gitlab.freedesktop.org/drm/intel/issues/7118
[i915#7456]: https://gitlab.freedesktop.org/drm/intel/issues/7456
[i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
[i915#7651]: https://gitlab.freedesktop.org/drm/intel/issues/7651
[i915#7697]: https://gitlab.freedesktop.org/drm/intel/issues/7697
[i915#7701]: https://gitlab.freedesktop.org/drm/intel/issues/7701
[i915#7711]: https://gitlab.freedesktop.org/drm/intel/issues/7711
[i915#7742]: https://gitlab.freedesktop.org/drm/intel/issues/7742
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#7949]: https://gitlab.freedesktop.org/drm/intel/issues/7949
[i915#7957]: https://gitlab.freedesktop.org/drm/intel/issues/7957
[i915#7981]: https://gitlab.freedesktop.org/drm/intel/issues/7981
[i915#8152]: https://gitlab.freedesktop.org/drm/intel/issues/8152

Build changes
-------------

* Linux: CI_DRM_12748 -> Patchwork_113846v3

CI-20190529: 20190529
CI_DRM_12748: 2d71e322ff387f05855e797efc6ccaf61dc4b80d @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7160: 45da871dd2684227e93a2fc002b87dfc58bd5fd9 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_113846v3: 2d71e322ff387f05855e797efc6ccaf61dc4b80d @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113846v3/index.html