Skip to contentSkip to conversation

drm/i915: Remove i915_request.lock requirement for execution callbacks

PATCH In review Chris Wilson 3 participants 15 messages Jul 14, 2020 – Jul 16, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm/i915: Remove i915_request.lock requirement for execution callbacks

We are using the i915_request.lock to serialise adding an execution callback with __i915_request_submit. However, if we use an atomic llist_add to serialise multiple waiters and then check to see if the request is already executing, we can remove the irq-spinlock.

Fixes 1d9221e9d395 ("drm/i915: Skip signaling a signaled request")
Cc Tvrtko Ursulin <[email protected]>
---
 drivers/gpu/drm/i915/i915_request.c | 38 +++++++----------------------
 1 file changed, 9 insertions(+), 29 deletions(-)
drivers/gpu/drm/i915/i915_request.c +9 -29
index 0b2fe55e6194..c59315def07d 100644
@@ -190,13 +190,11 @@ static void __notify_execute_cb(struct i915_request *rq)
 {
 	struct execute_cb *cb, *cn;
 
-	lockdep_assert_held(&rq->lock);
-
-	GEM_BUG_ON(!i915_request_is_active(rq));
 	if (llist_empty(&rq->execute_cb))
 		return;
 
-	llist_for_each_entry_safe(cb, cn, rq->execute_cb.first, work.llnode)
+	llist_for_each_entry_safe(cb, cn,
+				  llist_del_all(&rq->execute_cb), work.llnode)
 		irq_work_queue(&cb->work);
 
 	/*
@@ -209,7 +207,6 @@ static void __notify_execute_cb(struct i915_request *rq)
 	 * preempt-to-idle cycle on the target engine, all the while the
 	 * master execute_cb may refire.
 	 */
-	init_llist_head(&rq->execute_cb);
 }
 
 static inline void
@@ -276,6 +273,7 @@ static void remove_from_engine(struct i915_request *rq)
 	list_del_init(&rq->sched.link);
 	clear_bit(I915_FENCE_FLAG_PQUEUE, &rq->fence.flags);
 	clear_bit(I915_FENCE_FLAG_HOLD, &rq->fence.flags);
+	set_bit(I915_FENCE_FLAG_ACTIVE, &rq->fence.flags);
 	spin_unlock_irq(&locked->active.lock);
 }
 
@@ -323,12 +321,8 @@ bool i915_request_retire(struct i915_request *rq)
 		GEM_BUG_ON(!atomic_read(&rq->engine->gt->rps.num_waiters));
 		atomic_dec(&rq->engine->gt->rps.num_waiters);
 	}
-	if (!test_bit(I915_FENCE_FLAG_ACTIVE, &rq->fence.flags)) {
-		set_bit(I915_FENCE_FLAG_ACTIVE, &rq->fence.flags);
-		__notify_execute_cb(rq);
-	}
-	GEM_BUG_ON(!llist_empty(&rq->execute_cb));
 	spin_unlock_irq(&rq->lock);
+	__notify_execute_cb(rq);
 
 	remove_from_client(rq);
 	__list_del_entry(&rq->link); /* poison neither prev/next (RCU walks) */
@@ -357,12 +351,6 @@ void i915_request_retire_upto(struct i915_request *rq)
 	} while (i915_request_retire(tmp) && tmp != rq);
 }
 
-static void __llist_add(struct llist_node *node, struct llist_head *head)
-{
-	node->next = head->first;
-	head->first = node;
-}
-
 static struct i915_request * const *
 __engine_active(struct intel_engine_cs *engine)
 {
@@ -439,18 +427,11 @@ __await_execution(struct i915_request *rq,
 		cb->work.func = irq_execute_cb_hook;
 	}
 
-	spin_lock_irq(&signal->lock);
-	if (i915_request_is_active(signal) || __request_in_flight(signal)) {
-		if (hook) {
-			hook(rq, &signal->fence);
-			i915_request_put(signal);
-		}
-		i915_sw_fence_complete(cb->fence);
-		kmem_cache_free(global.slab_execute_cbs, cb);
-	} else {
-		__llist_add(&cb->work.llnode, &signal->execute_cb);
+	if (llist_add(&cb->work.llnode, &signal->execute_cb)) {
+		if (i915_request_is_active(signal) ||
+		    __request_in_flight(signal))
+			__notify_execute_cb(signal);
 	}
-	spin_unlock_irq(&signal->lock);
 
 	return 0;
 }
@@ -565,19 +546,18 @@ bool __i915_request_submit(struct i915_request *request)
 		list_move_tail(&request->sched.link, &engine->active.requests);
 		clear_bit(I915_FENCE_FLAG_PQUEUE, &request->fence.flags);
 	}
+	__notify_execute_cb(request);
 
 	/* We may be recursing from the signal callback of another i915 fence */
 	if (!i915_request_signaled(request)) {
 		spin_lock_nested(&request->lock, SINGLE_DEPTH_NESTING);
 
-		__notify_execute_cb(request);
 		if (test_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
 			     &request->fence.flags) &&
 		    !i915_request_enable_breadcrumb(request))
 			intel_engine_signal_breadcrumbs(engine);
 
 		spin_unlock(&request->lock);
-		GEM_BUG_ON(!llist_empty(&request->execute_cb));
 	}
 
 	return result;
Signature · 6 lines
2.20.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

PATCH 2/2 drm/i915: Remove requirement for holding i915_request.lock for breadcrumbs

Since the breadcrumb enabling/cancelling itself is serialised by the breadcrumbs.irq_lock, with a bit of care we can remove the outer serialisation with i915_request.lock for concurrent dma_fence_enable_signaling(). This has the important side-effect of eliminating the nested i915_request.lock within request submission.

---
 drivers/gpu/drm/i915/gt/intel_breadcrumbs.c | 100 +++++++++++---------
 drivers/gpu/drm/i915/gt/intel_lrc.c         |  14 ---
 drivers/gpu/drm/i915/i915_request.c         |  25 ++---
 3 files changed, 60 insertions(+), 79 deletions(-)
drivers/gpu/drm/i915/gt/intel_breadcrumbs.c +54 -46
index 91786310c114..87fd06d3eb3f 100644
@@ -220,17 +220,17 @@ static void signal_irq_work(struct irq_work *work)
 	}
 }
 
-static bool __intel_breadcrumbs_arm_irq(struct intel_breadcrumbs *b)
+static void __intel_breadcrumbs_arm_irq(struct intel_breadcrumbs *b)
 {
 	struct intel_engine_cs *engine =
 		container_of(b, struct intel_engine_cs, breadcrumbs);
 
 	lockdep_assert_held(&b->irq_lock);
 	if (b->irq_armed)
-		return true;
+		return;
 
 	if (!intel_gt_pm_get_if_awake(engine->gt))
-		return false;
+		return;
 
 	/*
 	 * The breadcrumb irq will be disarmed on the interrupt after the
@@ -250,8 +250,6 @@ static bool __intel_breadcrumbs_arm_irq(struct intel_breadcrumbs *b)
 
 	if (!b->irq_enabled++)
 		irq_enable(engine);
-
-	return true;
 }
 
 void intel_engine_init_breadcrumbs(struct intel_engine_cs *engine)
@@ -310,57 +308,69 @@ void intel_engine_fini_breadcrumbs(struct intel_engine_cs *engine)
 {
 }
 
-bool i915_request_enable_breadcrumb(struct i915_request *rq)
+static void insert_breadcrumb(struct i915_request *rq,
+			      struct intel_breadcrumbs *b)
 {
-	lockdep_assert_held(&rq->lock);
+	struct intel_context *ce = rq->context;
+	struct list_head *pos;
 
-	if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &rq->fence.flags))
-		return true;
+	if (test_bit(I915_FENCE_FLAG_SIGNAL, &rq->fence.flags))
+		return;
 
-	if (test_bit(I915_FENCE_FLAG_ACTIVE, &rq->fence.flags)) {
-		struct intel_breadcrumbs *b = &rq->engine->breadcrumbs;
-		struct intel_context *ce = rq->context;
-		struct list_head *pos;
+	__intel_breadcrumbs_arm_irq(b);
 
-		spin_lock(&b->irq_lock);
+	/*
+	 * We keep the seqno in retirement order, so we can break
+	 * inside intel_engine_signal_breadcrumbs as soon as we've
+	 * passed the last completed request (or seen a request that
+	 * hasn't event started). We could walk the timeline->requests,
+	 * but keeping a separate signalers_list has the advantage of
+	 * hopefully being much smaller than the full list and so
+	 * provides faster iteration and detection when there are no
+	 * more interrupts required for this context.
+	 *
+	 * We typically expect to add new signalers in order, so we
+	 * start looking for our insertion point from the tail of
+	 * the list.
+	 */
+	list_for_each_prev(pos, &ce->signals) {
+		struct i915_request *it =
+			list_entry(pos, typeof(*it), signal_link);
+
+		if (i915_seqno_passed(rq->fence.seqno, it->fence.seqno))
+			break;
+	}
+	list_add(&rq->signal_link, pos);
+	if (pos == &ce->signals) /* catch transitions from empty list */
+		list_move_tail(&ce->signal_link, &b->signalers);
+	GEM_BUG_ON(!check_signal_order(ce, rq));
 
-		if (test_bit(I915_FENCE_FLAG_SIGNAL, &rq->fence.flags))
-			goto unlock;
+	set_bit(I915_FENCE_FLAG_SIGNAL, &rq->fence.flags);
+}
 
-		if (!__intel_breadcrumbs_arm_irq(b))
-			goto unlock;
+bool i915_request_enable_breadcrumb(struct i915_request *rq)
+{
+	struct intel_breadcrumbs *b;
 
-		/*
-		 * We keep the seqno in retirement order, so we can break
-		 * inside intel_engine_signal_breadcrumbs as soon as we've
-		 * passed the last completed request (or seen a request that
-		 * hasn't event started). We could walk the timeline->requests,
-		 * but keeping a separate signalers_list has the advantage of
-		 * hopefully being much smaller than the full list and so
-		 * provides faster iteration and detection when there are no
-		 * more interrupts required for this context.
-		 *
-		 * We typically expect to add new signalers in order, so we
-		 * start looking for our insertion point from the tail of
-		 * the list.
-		 */
-		list_for_each_prev(pos, &ce->signals) {
-			struct i915_request *it =
-				list_entry(pos, typeof(*it), signal_link);
+	if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &rq->fence.flags))
+		return true;
 
-			if (i915_seqno_passed(rq->fence.seqno, it->fence.seqno))
-				break;
-		}
-		list_add(&rq->signal_link, pos);
-		if (pos == &ce->signals) /* catch transitions from empty list */
-			list_move_tail(&ce->signal_link, &b->signalers);
-		GEM_BUG_ON(!check_signal_order(ce, rq));
+	if (!test_bit(I915_FENCE_FLAG_ACTIVE, &rq->fence.flags))
+		return true;
 
-		set_bit(I915_FENCE_FLAG_SIGNAL, &rq->fence.flags);
-unlock:
+	b = &READ_ONCE(rq->engine)->breadcrumbs;
+	spin_lock(&b->irq_lock);
+	while (unlikely(b != &READ_ONCE(rq->engine)->breadcrumbs)) {
 		spin_unlock(&b->irq_lock);
+		b = &READ_ONCE(rq->engine)->breadcrumbs;
+		spin_lock(&b->irq_lock);
 	}
 
+	if (test_bit(I915_FENCE_FLAG_ACTIVE, &rq->fence.flags))
+		insert_breadcrumb(rq, b);
+
+	spin_unlock(&b->irq_lock);
+
 	return !__request_completed(rq);
 }
 
@@ -368,8 +378,6 @@ void i915_request_cancel_breadcrumb(struct i915_request *rq)
 {
 	struct intel_breadcrumbs *b = &rq->engine->breadcrumbs;
 
-	lockdep_assert_held(&rq->lock);
-
 	/*
 	 * We must wait for b->irq_lock so that we know the interrupt handler
 	 * has released its reference to the intel_context and has completed
drivers/gpu/drm/i915/gt/intel_lrc.c +0 -14
index e0280a672f1d..aa7be7f05f8c 100644
@@ -1148,20 +1148,6 @@ __unwind_incomplete_requests(struct intel_engine_cs *engine)
 		} else {
 			struct intel_engine_cs *owner = rq->context->engine;
 
-			/*
-			 * Decouple the virtual breadcrumb before moving it
-			 * back to the virtual engine -- we don't want the
-			 * request to complete in the background and try
-			 * and cancel the breadcrumb on the virtual engine
-			 * (instead of the old engine where it is linked)!
-			 */
-			if (test_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
-				     &rq->fence.flags)) {
-				spin_lock_nested(&rq->lock,
-						 SINGLE_DEPTH_NESTING);
-				i915_request_cancel_breadcrumb(rq);
-				spin_unlock(&rq->lock);
-			}
 			WRITE_ONCE(rq->engine, owner);
 			owner->submit_request(rq);
 			active = NULL;
drivers/gpu/drm/i915/i915_request.c +6 -19
index c59315def07d..df82b31dc35c 100644
@@ -315,7 +315,7 @@ bool i915_request_retire(struct i915_request *rq)
 	i915_request_mark_complete(rq);
 	if (!i915_request_signaled(rq))
 		dma_fence_signal_locked(&rq->fence);
-	if (test_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT, &rq->fence.flags))
+	if (test_bit(I915_FENCE_FLAG_SIGNAL, &rq->fence.flags))
 		i915_request_cancel_breadcrumb(rq);
 	if (i915_request_has_waitboost(rq)) {
 		GEM_BUG_ON(!atomic_read(&rq->engine->gt->rps.num_waiters));
@@ -548,17 +548,9 @@ bool __i915_request_submit(struct i915_request *request)
 	}
 	__notify_execute_cb(request);
 
-	/* We may be recursing from the signal callback of another i915 fence */
-	if (!i915_request_signaled(request)) {
-		spin_lock_nested(&request->lock, SINGLE_DEPTH_NESTING);
-
-		if (test_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
-			     &request->fence.flags) &&
-		    !i915_request_enable_breadcrumb(request))
-			intel_engine_signal_breadcrumbs(engine);
-
-		spin_unlock(&request->lock);
-	}
+	if (test_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT, &request->fence.flags) &&
+	    !i915_request_enable_breadcrumb(request))
+		intel_engine_signal_breadcrumbs(engine);
 
 	return result;
 }
@@ -590,17 +582,12 @@ void __i915_request_unsubmit(struct i915_request *request)
 	 * is kept in seqno/ring order.
 	 */
 
-	/* We may be recursing from the signal callback of another i915 fence */
-	spin_lock_nested(&request->lock, SINGLE_DEPTH_NESTING);
+	GEM_BUG_ON(!test_bit(I915_FENCE_FLAG_ACTIVE, &request->fence.flags));
+	clear_bit_unlock(I915_FENCE_FLAG_ACTIVE, &request->fence.flags);
 
 	if (test_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT, &request->fence.flags))
 		i915_request_cancel_breadcrumb(request);
 
-	GEM_BUG_ON(!test_bit(I915_FENCE_FLAG_ACTIVE, &request->fence.flags));
-	clear_bit(I915_FENCE_FLAG_ACTIVE, &request->fence.flags);
-
-	spin_unlock(&request->lock);
-
 	/* We've already spun, don't charge on resubmitting. */
 	if (request->sched.semaphores && i915_request_started(request))
 		request->sched.semaphores = 0;
Signature · 6 lines
2.20.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Remove requirement for holding i915_request.lock for breadcrumbs

Quoted 2 lines · Chris Wilson

Since the breadcrumb enabling/cancelling itself is serialised by the breadcrumbs.irq_lock, with a bit of care we can remove the outer

A few sentences explaining this care would be really helpful for review.

Quoted 135 lines

serialisation with i915_request.lock for concurrent dma_fence_enable_signaling(). This has the important side-effect of eliminating the nested i915_request.lock within request submission.

---
  drivers/gpu/drm/i915/gt/intel_breadcrumbs.c | 100 +++++++++++---------
  drivers/gpu/drm/i915/gt/intel_lrc.c         |  14 ---
  drivers/gpu/drm/i915/i915_request.c         |  25 ++---
  3 files changed, 60 insertions(+), 79 deletions(-)
drivers/gpu/drm/i915/gt/intel_breadcrumbs.c +44 -42
index 91786310c114..87fd06d3eb3f 100644
@@ -220,17 +220,17 @@ static void signal_irq_work(struct irq_work *work)
  	}
  }
 
-static bool __intel_breadcrumbs_arm_irq(struct intel_breadcrumbs *b)
+static void __intel_breadcrumbs_arm_irq(struct intel_breadcrumbs *b)
  {
  	struct intel_engine_cs *engine =
  		container_of(b, struct intel_engine_cs, breadcrumbs);
 
  	lockdep_assert_held(&b->irq_lock);
  	if (b->irq_armed)
-		return true;
+		return;
 
  	if (!intel_gt_pm_get_if_awake(engine->gt))
-		return false;
+		return;
 
  	/*
  	 * The breadcrumb irq will be disarmed on the interrupt after the
@@ -250,8 +250,6 @@ static bool __intel_breadcrumbs_arm_irq(struct intel_breadcrumbs *b)
 
  	if (!b->irq_enabled++)
  		irq_enable(engine);
-
-	return true;
  }
 
  void intel_engine_init_breadcrumbs(struct intel_engine_cs *engine)
@@ -310,57 +308,69 @@ void intel_engine_fini_breadcrumbs(struct intel_engine_cs *engine)
  {
  }
 
-bool i915_request_enable_breadcrumb(struct i915_request *rq)
+static void insert_breadcrumb(struct i915_request *rq,
+			      struct intel_breadcrumbs *b)
  {
-	lockdep_assert_held(&rq->lock);
+	struct intel_context *ce = rq->context;
+	struct list_head *pos;
 
-	if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &rq->fence.flags))
-		return true;
+	if (test_bit(I915_FENCE_FLAG_SIGNAL, &rq->fence.flags))
+		return;
 
-	if (test_bit(I915_FENCE_FLAG_ACTIVE, &rq->fence.flags)) {
-		struct intel_breadcrumbs *b = &rq->engine->breadcrumbs;
-		struct intel_context *ce = rq->context;
-		struct list_head *pos;
+	__intel_breadcrumbs_arm_irq(b);
 
-		spin_lock(&b->irq_lock);
+	/*
+	 * We keep the seqno in retirement order, so we can break
+	 * inside intel_engine_signal_breadcrumbs as soon as we've
+	 * passed the last completed request (or seen a request that
+	 * hasn't event started). We could walk the timeline->requests,
+	 * but keeping a separate signalers_list has the advantage of
+	 * hopefully being much smaller than the full list and so
+	 * provides faster iteration and detection when there are no
+	 * more interrupts required for this context.
+	 *
+	 * We typically expect to add new signalers in order, so we
+	 * start looking for our insertion point from the tail of
+	 * the list.
+	 */
+	list_for_each_prev(pos, &ce->signals) {
+		struct i915_request *it =
+			list_entry(pos, typeof(*it), signal_link);
+
+		if (i915_seqno_passed(rq->fence.seqno, it->fence.seqno))
+			break;
+	}
+	list_add(&rq->signal_link, pos);
+	if (pos == &ce->signals) /* catch transitions from empty list */
+		list_move_tail(&ce->signal_link, &b->signalers);
+	GEM_BUG_ON(!check_signal_order(ce, rq));
 
-		if (test_bit(I915_FENCE_FLAG_SIGNAL, &rq->fence.flags))
-			goto unlock;
+	set_bit(I915_FENCE_FLAG_SIGNAL, &rq->fence.flags);
+}
 
-		if (!__intel_breadcrumbs_arm_irq(b))
-			goto unlock;
+bool i915_request_enable_breadcrumb(struct i915_request *rq)
+{
+	struct intel_breadcrumbs *b;
 
-		/*
-		 * We keep the seqno in retirement order, so we can break
-		 * inside intel_engine_signal_breadcrumbs as soon as we've
-		 * passed the last completed request (or seen a request that
-		 * hasn't event started). We could walk the timeline->requests,
-		 * but keeping a separate signalers_list has the advantage of
-		 * hopefully being much smaller than the full list and so
-		 * provides faster iteration and detection when there are no
-		 * more interrupts required for this context.
-		 *
-		 * We typically expect to add new signalers in order, so we
-		 * start looking for our insertion point from the tail of
-		 * the list.
-		 */
-		list_for_each_prev(pos, &ce->signals) {
-			struct i915_request *it =
-				list_entry(pos, typeof(*it), signal_link);
+	if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &rq->fence.flags))
+		return true;
 
-			if (i915_seqno_passed(rq->fence.seqno, it->fence.seqno))
-				break;
-		}
-		list_add(&rq->signal_link, pos);
-		if (pos == &ce->signals) /* catch transitions from empty list */
-			list_move_tail(&ce->signal_link, &b->signalers);
-		GEM_BUG_ON(!check_signal_order(ce, rq));
+	if (!test_bit(I915_FENCE_FLAG_ACTIVE, &rq->fence.flags))
+		return true;

drivers/gpu/drm/i915/gt/intel_breadcrumbs.c void intel_engine_fini_breadcrumbs(struct intel_engine_cs *engine) · line 367

Quoted 10 lines
drivers/gpu/drm/i915/gt/intel_breadcrumbs.c +5 -2
 
-		set_bit(I915_FENCE_FLAG_SIGNAL, &rq->fence.flags);
-unlock:
+	b = &READ_ONCE(rq->engine)->breadcrumbs;
+	spin_lock(&b->irq_lock);
+	while (unlikely(b != &READ_ONCE(rq->engine)->breadcrumbs)) {
  		spin_unlock(&b->irq_lock);
+		b = &READ_ONCE(rq->engine)->breadcrumbs;
+		spin_lock(&b->irq_lock);
  	}

Comment is needed for this loop.

Quoted 30 lines
drivers/gpu/drm/i915/gt/intel_breadcrumbs.c +5 -2
+	if (test_bit(I915_FENCE_FLAG_ACTIVE, &rq->fence.flags))
+		insert_breadcrumb(rq, b);
+
+	spin_unlock(&b->irq_lock);
+
  	return !__request_completed(rq);
  }
 
@@ -368,8 +378,6 @@ void i915_request_cancel_breadcrumb(struct i915_request *rq)
  {
  	struct intel_breadcrumbs *b = &rq->engine->breadcrumbs;
 
-	lockdep_assert_held(&rq->lock);
-
  	/*
  	 * We must wait for b->irq_lock so that we know the interrupt handler
  	 * has released its reference to the intel_context and has completed
drivers/gpu/drm/i915/gt/intel_lrc.c +0 -4
index e0280a672f1d..aa7be7f05f8c 100644
@@ -1148,20 +1148,6 @@ __unwind_incomplete_requests(struct intel_engine_cs *engine)
  		} else {
  			struct intel_engine_cs *owner = rq->context->engine;
 
-			/*
-			 * Decouple the virtual breadcrumb before moving it
-			 * back to the virtual engine -- we don't want the
-			 * request to complete in the background and try

drivers/gpu/drm/i915/gt/intel_lrc.c __unwind_incomplete_requests(struct intel_engine_cs *engine) · line 1164

Quoted 10 lines
drivers/gpu/drm/i915/gt/intel_lrc.c +0 -10
-			 * and cancel the breadcrumb on the virtual engine
-			 * (instead of the old engine where it is linked)!
-			 */
-			if (test_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
-				     &rq->fence.flags)) {
-				spin_lock_nested(&rq->lock,
-						 SINGLE_DEPTH_NESTING);
-				i915_request_cancel_breadcrumb(rq);
-				spin_unlock(&rq->lock);
-			}

Why is this not needed any more?

Quoted 38 lines
drivers/gpu/drm/i915/gt/intel_lrc.c +0 -0
  			WRITE_ONCE(rq->engine, owner);
  			owner->submit_request(rq);
  			active = NULL;
drivers/gpu/drm/i915/i915_request.c +4 -12
index c59315def07d..df82b31dc35c 100644
@@ -315,7 +315,7 @@ bool i915_request_retire(struct i915_request *rq)
  	i915_request_mark_complete(rq);
  	if (!i915_request_signaled(rq))
  		dma_fence_signal_locked(&rq->fence);
-	if (test_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT, &rq->fence.flags))
+	if (test_bit(I915_FENCE_FLAG_SIGNAL, &rq->fence.flags))
  		i915_request_cancel_breadcrumb(rq);
  	if (i915_request_has_waitboost(rq)) {
  		GEM_BUG_ON(!atomic_read(&rq->engine->gt->rps.num_waiters));
@@ -548,17 +548,9 @@ bool __i915_request_submit(struct i915_request *request)
  	}
  	__notify_execute_cb(request);
 
-	/* We may be recursing from the signal callback of another i915 fence */
-	if (!i915_request_signaled(request)) {
-		spin_lock_nested(&request->lock, SINGLE_DEPTH_NESTING);
-
-		if (test_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
-			     &request->fence.flags) &&
-		    !i915_request_enable_breadcrumb(request))
-			intel_engine_signal_breadcrumbs(engine);
-
-		spin_unlock(&request->lock);
-	}
+	if (test_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT, &request->fence.flags) &&
+	    !i915_request_enable_breadcrumb(request))
+		intel_engine_signal_breadcrumbs(engine);
 
  	return result;
  }

drivers/gpu/drm/i915/i915_request.c void __i915_request_unsubmit(struct i915_request *request) · line 586

Quoted 7 lines
drivers/gpu/drm/i915/i915_request.c +2 -2
@@ -590,17 +582,12 @@ void __i915_request_unsubmit(struct i915_request *request)
  	 * is kept in seqno/ring order.
  	 */
 
-	/* We may be recursing from the signal callback of another i915 fence */
-	spin_lock_nested(&request->lock, SINGLE_DEPTH_NESTING);
+	GEM_BUG_ON(!test_bit(I915_FENCE_FLAG_ACTIVE, &request->fence.flags));
+	clear_bit_unlock(I915_FENCE_FLAG_ACTIVE, &request->fence.flags);

Why is release barrier important for this flag? (Comment as well please.)

drivers/gpu/drm/i915/i915_request.c void __i915_request_unsubmit(struct i915_request *request)

Quoted 13 lines
drivers/gpu/drm/i915/i915_request.c +0 -5
  	if (test_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT, &request->fence.flags))
  		i915_request_cancel_breadcrumb(request);
 
-	GEM_BUG_ON(!test_bit(I915_FENCE_FLAG_ACTIVE, &request->fence.flags));
-	clear_bit(I915_FENCE_FLAG_ACTIVE, &request->fence.flags);
-
-	spin_unlock(&request->lock);
-
  	/* We've already spun, don't charge on resubmitting. */
  	if (request->sched.semaphores && i915_request_started(request))
  		request->sched.semaphores = 0;
 

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Remove requirement for holding i915_request.lock for breadcrumbs

Quoting Tvrtko Ursulin (2020-07-16 10:01:15)

Quoted 10 lines · Chris Wilson
Quoted 8 lines
drivers/gpu/drm/i915/gt/intel_lrc.c +0 -0
index e0280a672f1d..aa7be7f05f8c 100644
@@ -1148,20 +1148,6 @@ __unwind_incomplete_requests(struct intel_engine_cs *engine)
              } else {
                      struct intel_engine_cs *owner = rq->context->engine;
 
Quoted 16 lines
Quoted 4 lines
drivers/gpu/drm/i915/gt/intel_lrc.c +0 -4
-                     /*
-                      * Decouple the virtual breadcrumb before moving it
-                      * back to the virtual engine -- we don't want the
-                      * request to complete in the background and try

drivers/gpu/drm/i915/gt/intel_lrc.c __unwind_incomplete_requests(struct intel_engine_cs *engine) · line 1164

Quoted 10 lines
drivers/gpu/drm/i915/gt/intel_lrc.c +0 -10
-                      * and cancel the breadcrumb on the virtual engine
-                      * (instead of the old engine where it is linked)!
-                      */
-                     if (test_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
-                                  &rq->fence.flags)) {
-                             spin_lock_nested(&rq->lock,
-                                              SINGLE_DEPTH_NESTING);
-                             i915_request_cancel_breadcrumb(rq);
-                             spin_unlock(&rq->lock);
-                     }

Why is this not needed any more?

Hindsight says that this was just paper. We have just done the same cancellation step in i915_request_unsubmit, so all this was doing is shrinking the window for a breadcrumb being attached [and with the serialisation around testing the I915_FENCE_FLAG_ACTIVE_BIT there should be no window at all] while the request is being moved back to the virtual engine.

Now the question is how do we end up attaching to the virtual engine while unsubmitted, and that appears to be entirely due to the ACTIVE flag being set in retire after completion. The other way is that we use the local virtual engine breadcrumb list to defer the signaling on submission of an old request.

So... If I can fix the issues around retirement that means we should be able to kill off virtual_xfer_breadcrumbs... I hope so. -Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Remove requirement for holding i915_request.lock for breadcrumbs

Quoted 28 lines · Chris Wilson

Quoting Tvrtko Ursulin (2020-07-16 10:01:15)

Quoted 10 lines · Chris Wilson
Quoted 8 lines
drivers/gpu/drm/i915/gt/intel_lrc.c +0 -0
index e0280a672f1d..aa7be7f05f8c 100644
@@ -1148,20 +1148,6 @@ __unwind_incomplete_requests(struct intel_engine_cs *engine)
               } else {
                       struct intel_engine_cs *owner = rq->context->engine;
 
Quoted 16 lines
Quoted 4 lines
drivers/gpu/drm/i915/gt/intel_lrc.c +0 -4
-                     /*
-                      * Decouple the virtual breadcrumb before moving it
-                      * back to the virtual engine -- we don't want the
-                      * request to complete in the background and try

drivers/gpu/drm/i915/gt/intel_lrc.c __unwind_incomplete_requests(struct intel_engine_cs *engine) · line 1164

Quoted 10 lines
drivers/gpu/drm/i915/gt/intel_lrc.c +0 -10
-                      * and cancel the breadcrumb on the virtual engine
-                      * (instead of the old engine where it is linked)!
-                      */
-                     if (test_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
-                                  &rq->fence.flags)) {
-                             spin_lock_nested(&rq->lock,
-                                              SINGLE_DEPTH_NESTING);
-                             i915_request_cancel_breadcrumb(rq);
-                             spin_unlock(&rq->lock);
-                     }

Why is this not needed any more?

Quoted 6 lines

Hindsight says that this was just paper. We have just done the same cancellation step in i915_request_unsubmit, so all this was doing is shrinking the window for a breadcrumb being attached [and with the serialisation around testing the I915_FENCE_FLAG_ACTIVE_BIT there should be no window at all] while the request is being moved back to the virtual engine.

True, how did we miss it until now..

Quoted 8 lines

Now the question is how do we end up attaching to the virtual engine while unsubmitted, and that appears to be entirely due to the ACTIVE flag being set in retire after completion. The other way is that we use the local virtual engine breadcrumb list to defer the signaling on submission of an old request.

So... If I can fix the issues around retirement that means we should be able to kill off virtual_xfer_breadcrumbs... I hope so.

I read this as a slightly different series will be coming?

Regards,

Tvrtko

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#5 lore raw

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Remove requirement for holding i915_request.lock for breadcrumbs

Quoting Tvrtko Ursulin (2020-07-16 11:11:55)

Quoted 46 lines · Chris Wilson
Quoted 28 lines

Quoting Tvrtko Ursulin (2020-07-16 10:01:15)

Quoted 10 lines · Chris Wilson
Quoted 8 lines
drivers/gpu/drm/i915/gt/intel_lrc.c +0 -0
index e0280a672f1d..aa7be7f05f8c 100644
@@ -1148,20 +1148,6 @@ __unwind_incomplete_requests(struct intel_engine_cs *engine)
               } else {
                       struct intel_engine_cs *owner = rq->context->engine;
 
Quoted 16 lines
Quoted 4 lines
drivers/gpu/drm/i915/gt/intel_lrc.c +0 -4
-                     /*
-                      * Decouple the virtual breadcrumb before moving it
-                      * back to the virtual engine -- we don't want the
-                      * request to complete in the background and try

drivers/gpu/drm/i915/gt/intel_lrc.c __unwind_incomplete_requests(struct intel_engine_cs *engine) · line 1164

Quoted 10 lines
drivers/gpu/drm/i915/gt/intel_lrc.c +0 -10
-                      * and cancel the breadcrumb on the virtual engine
-                      * (instead of the old engine where it is linked)!
-                      */
-                     if (test_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
-                                  &rq->fence.flags)) {
-                             spin_lock_nested(&rq->lock,
-                                              SINGLE_DEPTH_NESTING);
-                             i915_request_cancel_breadcrumb(rq);
-                             spin_unlock(&rq->lock);
-                     }

Why is this not needed any more?

Quoted 6 lines

Hindsight says that this was just paper. We have just done the same cancellation step in i915_request_unsubmit, so all this was doing is shrinking the window for a breadcrumb being attached [and with the serialisation around testing the I915_FENCE_FLAG_ACTIVE_BIT there should be no window at all] while the request is being moved back to the virtual engine.

True, how did we miss it until now..

Quoted 6 lines

Now the question is how do we end up attaching to the virtual engine while unsubmitted, and that appears to be entirely due to the ACTIVE flag being set in retire after completion. The other way is that we use the local virtual engine breadcrumb list to defer the signaling on submission of an old request.

Quoted 4 lines
Quoted 2 lines

So... If I can fix the issues around retirement that means we should be able to kill off virtual_xfer_breadcrumbs... I hope so.

I read this as a slightly different series will be coming?

Yes. Testing in progress, while I write comments.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#6 lore raw

[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Remove i915_request.lock requirement for execution callbacks

In reply to Chris Wilson
== Series Details ==

== Series Details ==

Series: series starting with [1/2] drm/i915: Remove i915_request.lock requirement for execution callbacks
URL : https://patchwork.freedesktop.org/series/79467/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_8742 -> Patchwork_18155
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

* igt@i915_module_load@reload:
- fi-bsw-n3050: [PASS][1] -> [DMESG-WARN][2] ([i915#1982])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/fi-bsw-n3050/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/fi-bsw-n3050/igt@[email protected]

* igt@i915_pm_rpm@basic-pci-d3-state:
- fi-byt-j1900: [PASS][3] -> [DMESG-WARN][4] ([i915#1982])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/fi-byt-j1900/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/fi-byt-j1900/igt@[email protected]

* igt@i915_selftest@live@gt_lrc:
- fi-tgl-u2: [PASS][5] -> [DMESG-FAIL][6] ([i915#1233])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/fi-tgl-u2/igt@i915_selftest@live@gt_lrc.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/fi-tgl-u2/igt@i915_selftest@live@gt_lrc.html

* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
- fi-icl-u2: [PASS][7] -> [DMESG-WARN][8] ([i915#1982])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/fi-icl-u2/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/fi-icl-u2/igt@[email protected]

* igt@kms_pipe_crc_basic@read-crc-pipe-a-frame-sequence:
- fi-tgl-u2: [PASS][9] -> [DMESG-WARN][10] ([i915#402])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/fi-tgl-u2/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/fi-tgl-u2/igt@[email protected]

* igt@vgem_basic@setversion:
- fi-tgl-y: [PASS][11] -> [DMESG-WARN][12] ([i915#402]) +1 similar issue
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/fi-tgl-y/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/fi-tgl-y/igt@[email protected]

#### Possible fixes ####

* igt@gem_exec_suspend@basic-s0:
- fi-tgl-u2: [FAIL][13] ([i915#1888]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/fi-tgl-u2/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/fi-tgl-u2/igt@[email protected]

* igt@i915_pm_rpm@basic-pci-d3-state:
- {fi-tgl-dsi}: [DMESG-WARN][15] ([i915#1982]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/fi-tgl-dsi/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/fi-tgl-dsi/igt@[email protected]

* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
- fi-bsw-n3050: [DMESG-WARN][17] ([i915#1982]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/fi-bsw-n3050/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/fi-bsw-n3050/igt@[email protected]

* igt@prime_vgem@basic-fence-flip:
- fi-tgl-y: [DMESG-WARN][19] ([i915#402]) -> [PASS][20] +1 similar issue
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/fi-tgl-y/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/fi-tgl-y/igt@[email protected]

#### Warnings ####

* igt@kms_cursor_legacy@basic-flip-after-cursor-legacy:
- fi-kbl-x1275: [DMESG-WARN][21] ([i915#62] / [i915#92] / [i915#95]) -> [DMESG-WARN][22] ([i915#62] / [i915#92]) +2 similar issues
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/fi-kbl-x1275/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/fi-kbl-x1275/igt@[email protected]

* igt@kms_cursor_legacy@basic-flip-before-cursor-varying-size:
- fi-kbl-x1275: [DMESG-WARN][23] ([i915#62] / [i915#92]) -> [DMESG-WARN][24] ([i915#62] / [i915#92] / [i915#95]) +1 similar issue
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/fi-kbl-x1275/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/fi-kbl-x1275/igt@[email protected]

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

[i915#1233]: https://gitlab.freedesktop.org/drm/intel/issues/1233
[i915#1888]: https://gitlab.freedesktop.org/drm/intel/issues/1888
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
[i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62
[i915#92]: https://gitlab.freedesktop.org/drm/intel/issues/92
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95

Participating hosts (46 -> 39)
------------------------------

Missing (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus

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

* Linux: CI_DRM_8742 -> Patchwork_18155

CI-20190529: 20190529
CI_DRM_8742: 60307710e143aa4d6e806309a6a931b6a0704a6b @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5735: 21f8204e54c122e4a0f8ca4b59e4b2db8d1ba687 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_18155: cdd22ff8f2924f58e73c4af631b72839cab7d083 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

cdd22ff8f292 drm/i915: Remove requirement for holding i915_request.lock for breadcrumbs 44d9b618da8f drm/i915: Remove i915_request.lock requirement for execution callbacks

== Logs ==

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

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#7 lore raw

[Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [1/2] drm/i915: Remove i915_request.lock requirement for execution callbacks

In reply to Chris Wilson
== Series Details ==

== Series Details ==

Series: series starting with [1/2] drm/i915: Remove i915_request.lock requirement for execution callbacks
URL : https://patchwork.freedesktop.org/series/79467/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_8742_full -> Patchwork_18155_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

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

### IGT changes ###

#### Issues hit ####

* igt@gen9_exec_parse@allowed-all:
- shard-apl: [PASS][1] -> [DMESG-WARN][2] ([i915#1436] / [i915#1635] / [i915#716])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-apl8/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-apl4/igt@[email protected]

* igt@i915_pm_rc6_residency@rc6-idle:
- shard-hsw: [PASS][3] -> [WARN][4] ([i915#1519])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-hsw2/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-hsw2/igt@[email protected]

* igt@i915_pm_rpm@system-suspend-execbuf:
- shard-tglb: [PASS][5] -> [DMESG-WARN][6] ([i915#402])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-tglb2/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-tglb5/igt@[email protected]

* igt@i915_selftest@mock@requests:
- shard-skl: [PASS][7] -> [INCOMPLETE][8] ([i915#198] / [i915#2110])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-skl9/igt@i915_selftest@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-skl6/igt@i915_selftest@[email protected]

* igt@kms_big_fb@x-tiled-64bpp-rotate-180:
- shard-glk: [PASS][9] -> [DMESG-FAIL][10] ([i915#118] / [i915#95])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-glk3/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-glk8/igt@[email protected]

* igt@kms_cursor_crc@pipe-b-cursor-64x64-onscreen:
- shard-kbl: [PASS][11] -> [DMESG-WARN][12] ([i915#93] / [i915#95]) +1 similar issue
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-kbl1/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-kbl1/igt@[email protected]

* igt@kms_flip@flip-vs-suspend-interruptible@a-dp1:
- shard-kbl: [PASS][13] -> [DMESG-WARN][14] ([i915#180]) +3 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-kbl1/igt@kms_flip@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-kbl3/igt@kms_flip@[email protected]

* igt@kms_flip@flip-vs-wf_vblank-interruptible@a-dp1:
- shard-kbl: [PASS][15] -> [DMESG-WARN][16] ([i915#1982])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-kbl4/igt@kms_flip@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-kbl6/igt@kms_flip@[email protected]

* igt@kms_frontbuffer_tracking@fbc-rgb101010-draw-mmap-wc:
- shard-apl: [PASS][17] -> [DMESG-WARN][18] ([i915#1635] / [i915#95]) +18 similar issues
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-apl7/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-apl2/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-render:
- shard-tglb: [PASS][19] -> [DMESG-WARN][20] ([i915#1982]) +1 similar issue
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-tglb1/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-tglb7/igt@[email protected]

* igt@kms_hdr@bpc-switch-suspend:
- shard-skl: [PASS][21] -> [FAIL][22] ([i915#1188])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-skl3/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-skl6/igt@[email protected]

* igt@kms_plane_cursor@pipe-a-viewport-size-128:
- shard-skl: [PASS][23] -> [DMESG-WARN][24] ([i915#1982]) +11 similar issues
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-skl9/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-skl1/igt@[email protected]

* igt@kms_psr2_su@page_flip:
- shard-iclb: [PASS][25] -> [SKIP][26] ([fdo#109642] / [fdo#111068])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-iclb2/igt@kms_psr2_su@page_flip.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-iclb5/igt@kms_psr2_su@page_flip.html

* igt@kms_psr@psr2_no_drrs:
- shard-iclb: [PASS][27] -> [SKIP][28] ([fdo#109441]) +1 similar issue
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-iclb2/igt@kms_psr@psr2_no_drrs.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-iclb3/igt@kms_psr@psr2_no_drrs.html

* igt@perf_pmu@module-unload:
- shard-apl: [PASS][29] -> [DMESG-WARN][30] ([i915#1635] / [i915#1982])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-apl1/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-apl7/igt@[email protected]

* igt@sysfs_heartbeat_interval@mixed@bcs0:
- shard-skl: [PASS][31] -> [FAIL][32] ([i915#1731])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-skl6/igt@sysfs_heartbeat_interval@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-skl8/igt@sysfs_heartbeat_interval@[email protected]

#### Possible fixes ####

* igt@core_setmaster@master-drop-set-user:
- shard-tglb: [DMESG-WARN][33] ([i915#402]) -> [PASS][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-tglb6/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-tglb3/igt@[email protected]

* igt@gem_exec_balancer@bonded-early:
- shard-kbl: [FAIL][35] ([i915#2079]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-kbl6/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-kbl1/igt@[email protected]

* igt@gem_exec_balancer@hang:
- shard-kbl: [DMESG-WARN][37] ([i915#93] / [i915#95]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-kbl4/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-kbl6/igt@[email protected]

* igt@gem_exec_fence@parallel@vcs0:
- shard-glk: [DMESG-WARN][39] ([i915#118] / [i915#95]) -> [PASS][40] +2 similar issues
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-glk3/igt@gem_exec_fence@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-glk5/igt@gem_exec_fence@[email protected]

* igt@gem_exec_fence@syncobj-unused-fence:
- shard-apl: [DMESG-WARN][41] ([i915#1635] / [i915#95]) -> [PASS][42] +9 similar issues
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-apl6/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-apl3/igt@[email protected]

* igt@gem_softpin@noreloc-interruptible:
- shard-snb: [INCOMPLETE][43] ([i915#82]) -> [PASS][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-snb2/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-snb5/igt@[email protected]

* igt@kms_cursor_crc@pipe-a-cursor-suspend:
- shard-kbl: [DMESG-WARN][45] ([i915#180]) -> [PASS][46] +4 similar issues
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-kbl2/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-kbl7/igt@[email protected]

* igt@kms_cursor_legacy@flip-vs-cursor-atomic:
- shard-skl: [FAIL][47] ([IGT#5]) -> [PASS][48]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-skl1/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-skl8/igt@[email protected]

* igt@kms_draw_crc@draw-method-rgb565-mmap-gtt-xtiled:
- shard-apl: [DMESG-WARN][49] ([i915#1635] / [i915#1982]) -> [PASS][50]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-apl7/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-apl6/igt@[email protected]

* igt@kms_flip@flip-vs-panning-interruptible@a-edp1:
- shard-skl: [DMESG-WARN][51] ([i915#1982]) -> [PASS][52] +8 similar issues
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-skl7/igt@kms_flip@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-skl10/igt@kms_flip@[email protected]

* igt@kms_flip@wf_vblank-ts-check-interruptible@a-edp1:
- shard-tglb: [DMESG-WARN][53] ([i915#1982]) -> [PASS][54] +1 similar issue
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-tglb7/igt@kms_flip@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-tglb6/igt@kms_flip@[email protected]

* igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-blt:
- shard-kbl: [DMESG-WARN][55] ([i915#1982]) -> [PASS][56]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-kbl1/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-kbl3/igt@[email protected]

* igt@kms_hdr@bpc-switch:
- shard-skl: [FAIL][57] ([i915#1188]) -> [PASS][58]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-skl9/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-skl6/igt@[email protected]

* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
- shard-skl: [INCOMPLETE][59] ([i915#69]) -> [PASS][60]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-skl7/igt@[email protected]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-skl9/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
- shard-skl: [FAIL][61] ([fdo#108145] / [i915#265]) -> [PASS][62]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-skl3/igt@[email protected]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-skl3/igt@[email protected]

* igt@kms_plane_scaling@pipe-b-scaler-with-clipping-clamping:
- shard-iclb: [DMESG-WARN][63] ([i915#1982]) -> [PASS][64] +1 similar issue
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-iclb3/igt@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-iclb6/igt@[email protected]

* igt@kms_psr@psr2_dpms:
- shard-iclb: [SKIP][65] ([fdo#109441]) -> [PASS][66]
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-iclb7/igt@kms_psr@psr2_dpms.html
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-iclb2/igt@kms_psr@psr2_dpms.html

* igt@kms_setmode@basic:
- shard-kbl: [FAIL][67] ([i915#31]) -> [PASS][68]
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-kbl3/igt@[email protected]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-kbl2/igt@[email protected]

* igt@kms_vblank@pipe-a-query-busy-hang:
- shard-snb: [TIMEOUT][69] ([i915#1958] / [i915#2119]) -> [PASS][70]
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-snb2/igt@[email protected]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-snb5/igt@[email protected]

* igt@perf@blocking-parameterized:
- shard-iclb: [FAIL][71] ([i915#1542]) -> [PASS][72]
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-iclb6/igt@[email protected]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-iclb4/igt@[email protected]

#### Warnings ####

* igt@gem_exec_reloc@basic-concurrent16:
- shard-snb: [TIMEOUT][73] ([i915#1958] / [i915#2119]) -> [FAIL][74] ([i915#1930])
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-snb2/igt@[email protected]
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-snb5/igt@[email protected]

* igt@gen9_exec_parse@bb-start-far:
- shard-hsw: [TIMEOUT][75] ([i915#1958] / [i915#2119]) -> [INCOMPLETE][76] ([i915#1958])
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-hsw7/igt@[email protected]
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-hsw4/igt@[email protected]

* igt@kms_content_protection@atomic-dpms:
- shard-kbl: [TIMEOUT][77] ([i915#1319] / [i915#1958] / [i915#2119]) -> [TIMEOUT][78] ([i915#1319] / [i915#2119])
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-kbl7/igt@[email protected]
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-kbl7/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-suspend:
- shard-kbl: [DMESG-WARN][79] ([i915#93] / [i915#95]) -> [DMESG-WARN][80] ([i915#180] / [i915#93] / [i915#95])
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-kbl3/igt@[email protected]
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-kbl6/igt@[email protected]

* igt@kms_plane_cursor@pipe-d-overlay-size-128:
- shard-snb: [TIMEOUT][81] ([i915#1958] / [i915#2119]) -> [SKIP][82] ([fdo#109271]) +3 similar issues
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-snb2/igt@[email protected]
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-snb5/igt@[email protected]

* igt@runner@aborted:
- shard-apl: ([FAIL][83], [FAIL][84], [FAIL][85]) ([i915#1610] / [i915#1635] / [i915#2110]) -> ([FAIL][86], [FAIL][87]) ([fdo#109271] / [i915#1635] / [i915#2110] / [i915#716])
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-apl3/igt@[email protected]
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-apl7/igt@[email protected]
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-apl6/igt@[email protected]
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-apl3/igt@[email protected]
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-apl4/igt@[email protected]
- shard-tglb: ([FAIL][88], [FAIL][89]) ([i915#1764] / [i915#2110]) -> [FAIL][90] ([i915#2110])
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-tglb3/igt@[email protected]
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8742/shard-tglb7/igt@[email protected]
[90]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18155/shard-tglb6/igt@[email protected]

[IGT#5]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/5
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[i915#118]: https://gitlab.freedesktop.org/drm/intel/issues/118
[i915#1188]: https://gitlab.freedesktop.org/drm/intel/issues/1188
[i915#1319]: https://gitlab.freedesktop.org/drm/intel/issues/1319
[i915#1436]: https://gitlab.freedesktop.org/drm/intel/issues/1436
[i915#1519]: https://gitlab.freedesktop.org/drm/intel/issues/1519
[i915#1542]: https://gitlab.freedesktop.org/drm/intel/issues/1542
[i915#1610]: https://gitlab.freedesktop.org/drm/intel/issues/1610
[i915#1635]: https://gitlab.freedesktop.org/drm/intel/issues/1635
[i915#1731]: https://gitlab.freedesktop.org/drm/intel/issues/1731
[i915#1764]: https://gitlab.freedesktop.org/drm/intel/issues/1764
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#1930]: https://gitlab.freedesktop.org/drm/intel/issues/1930
[i915#1958]: https://gitlab.freedesktop.org/drm/intel/issues/1958
[i915#198]: https://gitlab.freedesktop.org/drm/intel/issues/198
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2079]: https://gitlab.freedesktop.org/drm/intel/issues/2079
[i915#2110]: https://gitlab.freedesktop.org/drm/intel/issues/2110
[i915#2119]: https://gitlab.freedesktop.org/drm/intel/issues/2119
[i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
[i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
[i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
[i915#69]: https://gitlab.freedesktop.org/drm/intel/issues/69
[i915#716]: https://gitlab.freedesktop.org/drm/intel/issues/716
[i915#82]: https://gitlab.freedesktop.org/drm/intel/issues/82
[i915#93]: https://gitlab.freedesktop.org/drm/intel/issues/93
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95

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

No changes in participating hosts

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

* Linux: CI_DRM_8742 -> Patchwork_18155

CI-20190529: 20190529
CI_DRM_8742: 60307710e143aa4d6e806309a6a931b6a0704a6b @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5735: 21f8204e54c122e4a0f8ca4b59e4b2db8d1ba687 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_18155: cdd22ff8f2924f58e73c4af631b72839cab7d083 @ 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_18155/index.html

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#8 lore raw
In reply to Chris Wilson
Quoted 83 lines · Chris Wilson

We are using the i915_request.lock to serialise adding an execution callback with __i915_request_submit. However, if we use an atomic llist_add to serialise multiple waiters and then check to see if the request is already executing, we can remove the irq-spinlock.

Fixes 1d9221e9d395 ("drm/i915: Skip signaling a signaled request")
Cc Tvrtko Ursulin <[email protected]>
---
  drivers/gpu/drm/i915/i915_request.c | 38 +++++++----------------------
  1 file changed, 9 insertions(+), 29 deletions(-)
drivers/gpu/drm/i915/i915_request.c +4 -20
index 0b2fe55e6194..c59315def07d 100644
@@ -190,13 +190,11 @@ static void __notify_execute_cb(struct i915_request *rq)
  {
  	struct execute_cb *cb, *cn;
 
-	lockdep_assert_held(&rq->lock);
-
-	GEM_BUG_ON(!i915_request_is_active(rq));
  	if (llist_empty(&rq->execute_cb))
  		return;
 
-	llist_for_each_entry_safe(cb, cn, rq->execute_cb.first, work.llnode)
+	llist_for_each_entry_safe(cb, cn,
+				  llist_del_all(&rq->execute_cb), work.llnode)
  		irq_work_queue(&cb->work);
 
  	/*
@@ -209,7 +207,6 @@ static void __notify_execute_cb(struct i915_request *rq)
  	 * preempt-to-idle cycle on the target engine, all the while the
  	 * master execute_cb may refire.
  	 */
-	init_llist_head(&rq->execute_cb);
  }
 
  static inline void
@@ -276,6 +273,7 @@ static void remove_from_engine(struct i915_request *rq)
  	list_del_init(&rq->sched.link);
  	clear_bit(I915_FENCE_FLAG_PQUEUE, &rq->fence.flags);
  	clear_bit(I915_FENCE_FLAG_HOLD, &rq->fence.flags);
+	set_bit(I915_FENCE_FLAG_ACTIVE, &rq->fence.flags);
  	spin_unlock_irq(&locked->active.lock);
  }
 
@@ -323,12 +321,8 @@ bool i915_request_retire(struct i915_request *rq)
  		GEM_BUG_ON(!atomic_read(&rq->engine->gt->rps.num_waiters));
  		atomic_dec(&rq->engine->gt->rps.num_waiters);
  	}
-	if (!test_bit(I915_FENCE_FLAG_ACTIVE, &rq->fence.flags)) {
-		set_bit(I915_FENCE_FLAG_ACTIVE, &rq->fence.flags);
-		__notify_execute_cb(rq);
-	}
-	GEM_BUG_ON(!llist_empty(&rq->execute_cb));
  	spin_unlock_irq(&rq->lock);
+	__notify_execute_cb(rq);
 
  	remove_from_client(rq);
  	__list_del_entry(&rq->link); /* poison neither prev/next (RCU walks) */
@@ -357,12 +351,6 @@ void i915_request_retire_upto(struct i915_request *rq)
  	} while (i915_request_retire(tmp) && tmp != rq);
  }
 
-static void __llist_add(struct llist_node *node, struct llist_head *head)
-{
-	node->next = head->first;
-	head->first = node;
-}
-
  static struct i915_request * const *
  __engine_active(struct intel_engine_cs *engine)
  {
@@ -439,18 +427,11 @@ __await_execution(struct i915_request *rq,
  		cb->work.func = irq_execute_cb_hook;
  	}
 
-	spin_lock_irq(&signal->lock);
-	if (i915_request_is_active(signal) || __request_in_flight(signal)) {
-		if (hook) {
-			hook(rq, &signal->fence);

drivers/gpu/drm/i915/i915_request.c __await_execution(struct i915_request *rq, · line 433

Quoted 10 lines
drivers/gpu/drm/i915/i915_request.c +4 -6
-			i915_request_put(signal);
-		}
-		i915_sw_fence_complete(cb->fence);
-		kmem_cache_free(global.slab_execute_cbs, cb);
-	} else {
-		__llist_add(&cb->work.llnode, &signal->execute_cb);
+	if (llist_add(&cb->work.llnode, &signal->execute_cb)) {
+		if (i915_request_is_active(signal) ||
+		    __request_in_flight(signal))
+			__notify_execute_cb(signal);

Any reason why the hook couldn't be called straight away but needs to always go through the worker now?

Maybe it would be easier to figure out if it is race free that way..

if (llist_add(..)) {
	llist_for_each_entry_safe(.., llist_del_all(..), .)

Looks safe, worker or not.

Regards,

Tvrtko

Quoted 17 lines
drivers/gpu/drm/i915/i915_request.c +1 -2
  	}
-	spin_unlock_irq(&signal->lock);
 
  	return 0;
  }
@@ -565,19 +546,18 @@ bool __i915_request_submit(struct i915_request *request)
  		list_move_tail(&request->sched.link, &engine->active.requests);
  		clear_bit(I915_FENCE_FLAG_PQUEUE, &request->fence.flags);
  	}
+	__notify_execute_cb(request);
 
  	/* We may be recursing from the signal callback of another i915 fence */
  	if (!i915_request_signaled(request)) {
  		spin_lock_nested(&request->lock, SINGLE_DEPTH_NESTING);
 
-		__notify_execute_cb(request);

drivers/gpu/drm/i915/i915_request.c bool __i915_request_submit(struct i915_request *request) · line 563

Quoted 10 lines
drivers/gpu/drm/i915/i915_request.c +0 -1
  		if (test_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
  			     &request->fence.flags) &&
  		    !i915_request_enable_breadcrumb(request))
  			intel_engine_signal_breadcrumbs(engine);
 
  		spin_unlock(&request->lock);
-		GEM_BUG_ON(!llist_empty(&request->execute_cb));
  	}
 
  	return result;

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#9 lore raw

Quoting Tvrtko Ursulin (2020-07-15 13:39:56)

Quoted 99 lines · Chris Wilson
Quoted 83 lines

We are using the i915_request.lock to serialise adding an execution callback with __i915_request_submit. However, if we use an atomic llist_add to serialise multiple waiters and then check to see if the request is already executing, we can remove the irq-spinlock.

Fixes 1d9221e9d395 ("drm/i915: Skip signaling a signaled request")
Cc Tvrtko Ursulin <[email protected]>
---
  drivers/gpu/drm/i915/i915_request.c | 38 +++++++----------------------
  1 file changed, 9 insertions(+), 29 deletions(-)
drivers/gpu/drm/i915/i915_request.c +4 -20
index 0b2fe55e6194..c59315def07d 100644
@@ -190,13 +190,11 @@ static void __notify_execute_cb(struct i915_request *rq)
  {
      struct execute_cb *cb, *cn;
 
-     lockdep_assert_held(&rq->lock);
-
-     GEM_BUG_ON(!i915_request_is_active(rq));
      if (llist_empty(&rq->execute_cb))
              return;
 
-     llist_for_each_entry_safe(cb, cn, rq->execute_cb.first, work.llnode)
+     llist_for_each_entry_safe(cb, cn,
+                               llist_del_all(&rq->execute_cb), work.llnode)
              irq_work_queue(&cb->work);
 
      /*
@@ -209,7 +207,6 @@ static void __notify_execute_cb(struct i915_request *rq)
       * preempt-to-idle cycle on the target engine, all the while the
       * master execute_cb may refire.
       */
-     init_llist_head(&rq->execute_cb);
  }
 
  static inline void
@@ -276,6 +273,7 @@ static void remove_from_engine(struct i915_request *rq)
      list_del_init(&rq->sched.link);
      clear_bit(I915_FENCE_FLAG_PQUEUE, &rq->fence.flags);
      clear_bit(I915_FENCE_FLAG_HOLD, &rq->fence.flags);
+     set_bit(I915_FENCE_FLAG_ACTIVE, &rq->fence.flags);
      spin_unlock_irq(&locked->active.lock);
  }
 
@@ -323,12 +321,8 @@ bool i915_request_retire(struct i915_request *rq)
              GEM_BUG_ON(!atomic_read(&rq->engine->gt->rps.num_waiters));
              atomic_dec(&rq->engine->gt->rps.num_waiters);
      }
-     if (!test_bit(I915_FENCE_FLAG_ACTIVE, &rq->fence.flags)) {
-             set_bit(I915_FENCE_FLAG_ACTIVE, &rq->fence.flags);
-             __notify_execute_cb(rq);
-     }
-     GEM_BUG_ON(!llist_empty(&rq->execute_cb));
      spin_unlock_irq(&rq->lock);
+     __notify_execute_cb(rq);
 
      remove_from_client(rq);
      __list_del_entry(&rq->link); /* poison neither prev/next (RCU walks) */
@@ -357,12 +351,6 @@ void i915_request_retire_upto(struct i915_request *rq)
      } while (i915_request_retire(tmp) && tmp != rq);
  }
 
-static void __llist_add(struct llist_node *node, struct llist_head *head)
-{
-     node->next = head->first;
-     head->first = node;
-}
-
  static struct i915_request * const *
  __engine_active(struct intel_engine_cs *engine)
  {
@@ -439,18 +427,11 @@ __await_execution(struct i915_request *rq,
              cb->work.func = irq_execute_cb_hook;
      }
 
-     spin_lock_irq(&signal->lock);
-     if (i915_request_is_active(signal) || __request_in_flight(signal)) {
-             if (hook) {
-                     hook(rq, &signal->fence);

drivers/gpu/drm/i915/i915_request.c __await_execution(struct i915_request *rq, · line 433

Quoted 10 lines
drivers/gpu/drm/i915/i915_request.c +4 -6
-                     i915_request_put(signal);
-             }
-             i915_sw_fence_complete(cb->fence);
-             kmem_cache_free(global.slab_execute_cbs, cb);
-     } else {
-             __llist_add(&cb->work.llnode, &signal->execute_cb);
+     if (llist_add(&cb->work.llnode, &signal->execute_cb)) {
+             if (i915_request_is_active(signal) ||
+                 __request_in_flight(signal))
+                     __notify_execute_cb(signal);

Any reason why the hook couldn't be called straight away but needs to always go through the worker now?

Quoted 4 lines

Maybe it would be easier to figure out if it is race free that way..

if (llist_add(..)) {
        llist_for_each_entry_safe(.., llist_del_all(..), .)

Then you would tell me off for open coding __notify_execute_cb for the benefit of not going through the irq_work. Something like

@@ -186,7 +186,7 @@ static void irq_execute_cb_hook(struct irq_work *wrk)

        irq_execute_cb(wrk);

}

-static void __notify_execute_cb(struct i915_request *rq) +static void __execute_cb_irq(struct i915_request *rq)

 {
        struct execute_cb *cb, *cn;

@@ -209,6 +209,15 @@ static void __notify_execute_cb(struct i915_request *rq)

         */

}

+static void __execute_cb_imm(struct i915_request *rq)
+{
+ struct execute_cb *cb, *cn;
+
+ llist_for_each_entry_safe(cb, cn,
+ llist_del_all(&rq->execute_cb), work.llnode)
+ cb->work.func(&cb->work);
+}
+
static inline void
remove_from_client(struct i915_request *request)
{
@@ -323,7 +332,7 @@ bool i915_request_retire(struct i915_request *rq)

                atomic_dec(&rq->engine->gt->rps.num_waiters);
        }
        spin_unlock_irq(&rq->lock);

- __notify_execute_cb(rq);
+ __execute_cb_imm(rq);

        remove_from_client(rq);
        __list_del_entry(&rq->link); /* poison neither prev/next (RCU walks) */
@@ -431,7 +440,7 @@ __await_execution(struct i915_request *rq,
        if (llist_add(&cb->work.llnode, &signal->execute_cb)) {
                if (i915_request_is_active(signal) ||
                    __request_in_flight(signal))
-                       __notify_execute_cb(signal);
+                       __execute_cb_imm(signal);
        }

        return 0;
@@ -547,7 +556,7 @@ bool __i915_request_submit(struct i915_request *request)
                list_move_tail(&request->sched.link, &engine->active.requests);
                clear_bit(I915_FENCE_FLAG_PQUEUE, &request->fence.flags);
        }

- __notify_execute_cb(request);
+ __execute_cb_irq(request);

        /* We may be recursing from the signal callback of another i915 fence */
        if (!i915_request_signaled(request)) {

-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#10 lore raw
Quoted 152 lines · Chris Wilson

Quoting Tvrtko Ursulin (2020-07-15 13:39:56)

Quoted 99 lines · Chris Wilson
Quoted 83 lines

We are using the i915_request.lock to serialise adding an execution callback with __i915_request_submit. However, if we use an atomic llist_add to serialise multiple waiters and then check to see if the request is already executing, we can remove the irq-spinlock.

Fixes 1d9221e9d395 ("drm/i915: Skip signaling a signaled request")
Cc Tvrtko Ursulin <[email protected]>
---
   drivers/gpu/drm/i915/i915_request.c | 38 +++++++----------------------
   1 file changed, 9 insertions(+), 29 deletions(-)
drivers/gpu/drm/i915/i915_request.c +4 -20
index 0b2fe55e6194..c59315def07d 100644
@@ -190,13 +190,11 @@ static void __notify_execute_cb(struct i915_request *rq)
   {
       struct execute_cb *cb, *cn;
 
-     lockdep_assert_held(&rq->lock);
-
-     GEM_BUG_ON(!i915_request_is_active(rq));
       if (llist_empty(&rq->execute_cb))
               return;
 
-     llist_for_each_entry_safe(cb, cn, rq->execute_cb.first, work.llnode)
+     llist_for_each_entry_safe(cb, cn,
+                               llist_del_all(&rq->execute_cb), work.llnode)
               irq_work_queue(&cb->work);
 
       /*
@@ -209,7 +207,6 @@ static void __notify_execute_cb(struct i915_request *rq)
        * preempt-to-idle cycle on the target engine, all the while the
        * master execute_cb may refire.
        */
-     init_llist_head(&rq->execute_cb);
   }
 
   static inline void
@@ -276,6 +273,7 @@ static void remove_from_engine(struct i915_request *rq)
       list_del_init(&rq->sched.link);
       clear_bit(I915_FENCE_FLAG_PQUEUE, &rq->fence.flags);
       clear_bit(I915_FENCE_FLAG_HOLD, &rq->fence.flags);
+     set_bit(I915_FENCE_FLAG_ACTIVE, &rq->fence.flags);
       spin_unlock_irq(&locked->active.lock);
   }
 
@@ -323,12 +321,8 @@ bool i915_request_retire(struct i915_request *rq)
               GEM_BUG_ON(!atomic_read(&rq->engine->gt->rps.num_waiters));
               atomic_dec(&rq->engine->gt->rps.num_waiters);
       }
-     if (!test_bit(I915_FENCE_FLAG_ACTIVE, &rq->fence.flags)) {
-             set_bit(I915_FENCE_FLAG_ACTIVE, &rq->fence.flags);
-             __notify_execute_cb(rq);
-     }
-     GEM_BUG_ON(!llist_empty(&rq->execute_cb));
       spin_unlock_irq(&rq->lock);
+     __notify_execute_cb(rq);
 
       remove_from_client(rq);
       __list_del_entry(&rq->link); /* poison neither prev/next (RCU walks) */
@@ -357,12 +351,6 @@ void i915_request_retire_upto(struct i915_request *rq)
       } while (i915_request_retire(tmp) && tmp != rq);
   }
 
-static void __llist_add(struct llist_node *node, struct llist_head *head)
-{
-     node->next = head->first;
-     head->first = node;
-}
-
   static struct i915_request * const *
   __engine_active(struct intel_engine_cs *engine)
   {
@@ -439,18 +427,11 @@ __await_execution(struct i915_request *rq,
               cb->work.func = irq_execute_cb_hook;
       }
 
-     spin_lock_irq(&signal->lock);
-     if (i915_request_is_active(signal) || __request_in_flight(signal)) {
-             if (hook) {
-                     hook(rq, &signal->fence);

drivers/gpu/drm/i915/i915_request.c __await_execution(struct i915_request *rq, · line 433

Quoted 10 lines
drivers/gpu/drm/i915/i915_request.c +4 -6
-                     i915_request_put(signal);
-             }
-             i915_sw_fence_complete(cb->fence);
-             kmem_cache_free(global.slab_execute_cbs, cb);
-     } else {
-             __llist_add(&cb->work.llnode, &signal->execute_cb);
+     if (llist_add(&cb->work.llnode, &signal->execute_cb)) {
+             if (i915_request_is_active(signal) ||
+                 __request_in_flight(signal))
+                     __notify_execute_cb(signal);

Any reason why the hook couldn't be called straight away but needs to always go through the worker now?

Quoted 4 lines

Maybe it would be easier to figure out if it is race free that way..

if (llist_add(..)) {
         llist_for_each_entry_safe(.., llist_del_all(..), .)

Then you would tell me off for open coding __notify_execute_cb for the benefit of not going through the irq_work. Something like

drivers/gpu/drm/i915/i915_request.c +12 -3
@@ -186,7 +186,7 @@ static void irq_execute_cb_hook(struct irq_work *wrk)
         irq_execute_cb(wrk);
  }
 
-static void __notify_execute_cb(struct i915_request *rq)
+static void __execute_cb_irq(struct i915_request *rq)
  {
         struct execute_cb *cb, *cn;
 
@@ -209,6 +209,15 @@ static void __notify_execute_cb(struct i915_request *rq)
          */
  }
 
+static void __execute_cb_imm(struct i915_request *rq)
+{
+       struct execute_cb *cb, *cn;
+
+       llist_for_each_entry_safe(cb, cn,
+                                 llist_del_all(&rq->execute_cb), work.llnode)
+               cb->work.func(&cb->work);
+}
+
  static inline void
  remove_from_client(struct i915_request *request)
  {
@@ -323,7 +332,7 @@ bool i915_request_retire(struct i915_request *rq)
                 atomic_dec(&rq->engine->gt->rps.num_waiters);
         }
         spin_unlock_irq(&rq->lock);
-       __notify_execute_cb(rq);
+       __execute_cb_imm(rq);
 
         remove_from_client(rq);
         __list_del_entry(&rq->link); /* poison neither prev/next (RCU walks) */
@@ -431,7 +440,7 @@ __await_execution(struct i915_request *rq,
         if (llist_add(&cb->work.llnode, &signal->execute_cb)) {
                 if (i915_request_is_active(signal) ||
                     __request_in_flight(signal))
-                       __notify_execute_cb(signal);
+                       __execute_cb_imm(signal);
         }
 
         return 0;

drivers/gpu/drm/i915/i915_request.c bool __i915_request_submit(struct i915_request *request) · line 562

Quoted 8 lines
drivers/gpu/drm/i915/i915_request.c +1 -1
@@ -547,7 +556,7 @@ bool __i915_request_submit(struct i915_request *request)
                 list_move_tail(&request->sched.link, &engine->active.requests);
                 clear_bit(I915_FENCE_FLAG_PQUEUE, &request->fence.flags);
         }
-       __notify_execute_cb(request);
+       __execute_cb_irq(request);
 
         /* We may be recursing from the signal callback of another i915 fence */
         if (!i915_request_signaled(request)) {

I think so. IRQ callback can call the imm version and check for if (..func) needs to go somewhere.

Regards,

Tvrtko

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#11 lore raw

PATCH v2 1/1 drm/i915: Remove i915_request.lock requirement for execution callbacks

In reply to Chris Wilson

We are using the i915_request.lock to serialise adding an execution callback with __i915_request_submit. However, if we use an atomic llist_add to serialise multiple waiters and then check to see if the request is already executing, we can remove the irq-spinlock.

v2: Avoid using the irq_work when outside of the irq-spinlocks, where we can execute the callbacks immediately.

Fixes 1d9221e9d395 ("drm/i915: Skip signaling a signaled request")
Cc Tvrtko Ursulin <[email protected]>
---
 drivers/gpu/drm/i915/i915_request.c | 74 ++++++++++++-----------------
 1 file changed, 31 insertions(+), 43 deletions(-)
drivers/gpu/drm/i915/i915_request.c +31 -43
index bb4eb1a8780e..9481e54d695e 100644
@@ -186,30 +186,34 @@ static void irq_execute_cb_hook(struct irq_work *wrk)
 	irq_execute_cb(wrk);
 }
 
-static void __notify_execute_cb(struct i915_request *rq)
+static __always_inline void
+__notify_execute_cb(struct i915_request *rq, bool (*fn)(struct irq_work *wrk))
 {
 	struct execute_cb *cb, *cn;
 
-	lockdep_assert_held(&rq->lock);
-
-	GEM_BUG_ON(!i915_request_is_active(rq));
 	if (llist_empty(&rq->execute_cb))
 		return;
 
-	llist_for_each_entry_safe(cb, cn, rq->execute_cb.first, work.llnode)
-		irq_work_queue(&cb->work);
+	llist_for_each_entry_safe(cb, cn,
+				  llist_del_all(&rq->execute_cb),
+				  work.llnode)
+		fn(&cb->work);
+}
 
-	/*
-	 * XXX Rollback on __i915_request_unsubmit()
-	 *
-	 * In the future, perhaps when we have an active time-slicing scheduler,
-	 * it will be interesting to unsubmit parallel execution and remove
-	 * busywaits from the GPU until their master is restarted. This is
-	 * quite hairy, we have to carefully rollback the fence and do a
-	 * preempt-to-idle cycle on the target engine, all the while the
-	 * master execute_cb may refire.
-	 */
-	init_llist_head(&rq->execute_cb);
+static void __notify_execute_cb_irq(struct i915_request *rq)
+{
+	__notify_execute_cb(rq, irq_work_queue);
+}
+
+static bool irq_work_imm(struct irq_work *wrk)
+{
+	wrk->func(wrk);
+	return false;
+}
+
+static void __notify_execute_cb_imm(struct i915_request *rq)
+{
+	__notify_execute_cb(rq, irq_work_imm);
 }
 
 static inline void
@@ -274,9 +278,11 @@ static void remove_from_engine(struct i915_request *rq)
 		locked = engine;
 	}
 	list_del_init(&rq->sched.link);
+	spin_unlock_irq(&locked->active.lock);
+
 	clear_bit(I915_FENCE_FLAG_PQUEUE, &rq->fence.flags);
 	clear_bit(I915_FENCE_FLAG_HOLD, &rq->fence.flags);
-	spin_unlock_irq(&locked->active.lock);
+	set_bit(I915_FENCE_FLAG_ACTIVE, &rq->fence.flags);
 }
 
 bool i915_request_retire(struct i915_request *rq)
@@ -288,6 +294,7 @@ bool i915_request_retire(struct i915_request *rq)
 
 	GEM_BUG_ON(!i915_sw_fence_signaled(&rq->submit));
 	trace_i915_request_retire(rq);
+	i915_request_mark_complete(rq);
 
 	/*
 	 * We know the GPU must have read the request to have
@@ -314,7 +321,6 @@ bool i915_request_retire(struct i915_request *rq)
 	remove_from_engine(rq);
 
 	spin_lock_irq(&rq->lock);
-	i915_request_mark_complete(rq);
 	if (!i915_request_signaled(rq))
 		dma_fence_signal_locked(&rq->fence);
 	if (test_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT, &rq->fence.flags))
@@ -323,12 +329,8 @@ bool i915_request_retire(struct i915_request *rq)
 		GEM_BUG_ON(!atomic_read(&rq->engine->gt->rps.num_waiters));
 		atomic_dec(&rq->engine->gt->rps.num_waiters);
 	}
-	if (!test_bit(I915_FENCE_FLAG_ACTIVE, &rq->fence.flags)) {
-		set_bit(I915_FENCE_FLAG_ACTIVE, &rq->fence.flags);
-		__notify_execute_cb(rq);
-	}
-	GEM_BUG_ON(!llist_empty(&rq->execute_cb));
 	spin_unlock_irq(&rq->lock);
+	__notify_execute_cb_imm(rq);
 
 	remove_from_client(rq);
 	__list_del_entry(&rq->link); /* poison neither prev/next (RCU walks) */
@@ -357,12 +359,6 @@ void i915_request_retire_upto(struct i915_request *rq)
 	} while (i915_request_retire(tmp) && tmp != rq);
 }
 
-static void __llist_add(struct llist_node *node, struct llist_head *head)
-{
-	node->next = head->first;
-	head->first = node;
-}
-
 static struct i915_request * const *
 __engine_active(struct intel_engine_cs *engine)
 {
@@ -439,18 +435,11 @@ __await_execution(struct i915_request *rq,
 		cb->work.func = irq_execute_cb_hook;
 	}
 
-	spin_lock_irq(&signal->lock);
-	if (i915_request_is_active(signal) || __request_in_flight(signal)) {
-		if (hook) {
-			hook(rq, &signal->fence);
-			i915_request_put(signal);
-		}
-		i915_sw_fence_complete(cb->fence);
-		kmem_cache_free(global.slab_execute_cbs, cb);
-	} else {
-		__llist_add(&cb->work.llnode, &signal->execute_cb);
+	if (llist_add(&cb->work.llnode, &signal->execute_cb)) {
+		if (i915_request_is_active(signal) ||
+		    __request_in_flight(signal))
+			__notify_execute_cb_imm(signal);
 	}
-	spin_unlock_irq(&signal->lock);
 
 	return 0;
 }
@@ -565,19 +554,18 @@ bool __i915_request_submit(struct i915_request *request)
 		list_move_tail(&request->sched.link, &engine->active.requests);
 		clear_bit(I915_FENCE_FLAG_PQUEUE, &request->fence.flags);
 	}
+	__notify_execute_cb_irq(request);
 
 	/* We may be recursing from the signal callback of another i915 fence */
 	if (!i915_request_signaled(request)) {
 		spin_lock_nested(&request->lock, SINGLE_DEPTH_NESTING);
 
-		__notify_execute_cb(request);
 		if (test_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
 			     &request->fence.flags) &&
 		    !i915_request_enable_breadcrumb(request))
 			intel_engine_signal_breadcrumbs(engine);
 
 		spin_unlock(&request->lock);
-		GEM_BUG_ON(!llist_empty(&request->execute_cb));
 	}
 
 	return result;
Signature · 6 lines
2.20.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#12 lore raw

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [v2] drm/i915: Remove i915_request.lock requirement for execution callbacks (rev2)

In reply to Chris Wilson
== Series Details ==

== Series Details ==

Series: series starting with [v2] drm/i915: Remove i915_request.lock requirement for execution callbacks (rev2)
URL : https://patchwork.freedesktop.org/series/79467/
State : warning

== Summary ==

$ dim sparse --fast origin/drm-tip
Sparse version: v0.6.0
Fast mode used, each commit won't be checked separately.

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#13 lore raw

[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [v2] drm/i915: Remove i915_request.lock requirement for execution callbacks (rev2)

In reply to Chris Wilson
== Series Details ==

== Series Details ==

Series: series starting with [v2] drm/i915: Remove i915_request.lock requirement for execution callbacks (rev2)
URL : https://patchwork.freedesktop.org/series/79467/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_8750 -> Patchwork_18178
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_ctx_create@basic:
- fi-tgl-y: [PASS][1] -> [DMESG-WARN][2] ([i915#402]) +1 similar issue
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/fi-tgl-y/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/fi-tgl-y/igt@[email protected]

* igt@gem_exec_suspend@basic-s3:
- fi-tgl-u2: [PASS][3] -> [FAIL][4] ([i915#1888])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/fi-tgl-u2/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/fi-tgl-u2/igt@[email protected]

* igt@i915_pm_rpm@basic-pci-d3-state:
- fi-tgl-y: [PASS][5] -> [DMESG-WARN][6] ([i915#1982])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/fi-tgl-y/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/fi-tgl-y/igt@[email protected]

* igt@i915_selftest@live@coherency:
- fi-gdg-551: [PASS][7] -> [DMESG-FAIL][8] ([i915#1748])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/fi-gdg-551/igt@i915_selftest@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/fi-gdg-551/igt@i915_selftest@[email protected]

* igt@kms_cursor_legacy@basic-flip-after-cursor-legacy:
- fi-icl-u2: [PASS][9] -> [DMESG-WARN][10] ([i915#1982])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/fi-icl-u2/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/fi-icl-u2/igt@[email protected]

#### Possible fixes ####

* igt@i915_module_load@reload:
- fi-byt-j1900: [DMESG-WARN][11] ([i915#1982]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/fi-byt-j1900/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/fi-byt-j1900/igt@[email protected]
- fi-bxt-dsi: [DMESG-WARN][13] ([i915#1635] / [i915#1982]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/fi-bxt-dsi/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/fi-bxt-dsi/igt@[email protected]
- fi-tgl-u2: [DMESG-WARN][15] ([i915#402]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/fi-tgl-u2/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/fi-tgl-u2/igt@[email protected]

* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
- fi-tgl-y: [DMESG-WARN][17] ([i915#1982]) -> [PASS][18] +1 similar issue
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/fi-tgl-y/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/fi-tgl-y/igt@[email protected]
- {fi-kbl-7560u}: [DMESG-WARN][19] ([i915#1982]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/fi-kbl-7560u/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/fi-kbl-7560u/igt@[email protected]
- {fi-tgl-dsi}: [DMESG-WARN][21] ([i915#1982]) -> [PASS][22] +1 similar issue
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/fi-tgl-dsi/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/fi-tgl-dsi/igt@[email protected]
- fi-bsw-kefka: [DMESG-WARN][23] ([i915#1982]) -> [PASS][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/fi-bsw-kefka/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/fi-bsw-kefka/igt@[email protected]

#### Warnings ####

* igt@i915_pm_rpm@module-reload:
- fi-kbl-x1275: [DMESG-FAIL][25] ([i915#62]) -> [SKIP][26] ([fdo#109271])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/fi-kbl-x1275/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/fi-kbl-x1275/igt@[email protected]

* igt@kms_flip@basic-flip-vs-wf_vblank@a-dp1:
- fi-kbl-x1275: [DMESG-WARN][27] ([i915#62] / [i915#92]) -> [DMESG-WARN][28] ([i915#62] / [i915#92] / [i915#95]) +3 similar issues
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/fi-kbl-x1275/igt@kms_flip@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/fi-kbl-x1275/igt@kms_flip@[email protected]

* igt@kms_force_connector_basic@force-edid:
- fi-kbl-x1275: [DMESG-WARN][29] ([i915#62] / [i915#92] / [i915#95]) -> [DMESG-WARN][30] ([i915#62] / [i915#92]) +4 similar issues
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/fi-kbl-x1275/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/fi-kbl-x1275/igt@[email protected]

* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- fi-kbl-x1275: [DMESG-WARN][31] ([i915#62] / [i915#92]) -> [DMESG-WARN][32] ([i915#1982] / [i915#62] / [i915#92])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/fi-kbl-x1275/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/fi-kbl-x1275/igt@[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
[i915#1635]: https://gitlab.freedesktop.org/drm/intel/issues/1635
[i915#1748]: https://gitlab.freedesktop.org/drm/intel/issues/1748
[i915#1888]: https://gitlab.freedesktop.org/drm/intel/issues/1888
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
[i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62
[i915#92]: https://gitlab.freedesktop.org/drm/intel/issues/92
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95

Participating hosts (47 -> 39)
------------------------------

Missing (8): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus

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

* Linux: CI_DRM_8750 -> Patchwork_18178

CI-20190529: 20190529
CI_DRM_8750: 0714e0ca72205b9c38c4b2a09d8d5981637af2fb @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5735: 21f8204e54c122e4a0f8ca4b59e4b2db8d1ba687 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_18178: fa1446a4646bc41f7f40ae47e7f33ca41b0a637a @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

fa1446a4646b drm/i915: Remove requirement for holding i915_request.lock for breadcrumbs 9b452fce0557 drm/i915: Remove i915_request.lock requirement for execution callbacks

== Logs ==

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

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#14 lore raw

[Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [v2] drm/i915: Remove i915_request.lock requirement for execution callbacks (rev2)

In reply to Chris Wilson
== Series Details ==

== Series Details ==

Series: series starting with [v2] drm/i915: Remove i915_request.lock requirement for execution callbacks (rev2)
URL : https://patchwork.freedesktop.org/series/79467/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_8750_full -> Patchwork_18178_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_gttfill@all:
- shard-glk: [PASS][1] -> [DMESG-WARN][2] ([i915#118] / [i915#95]) +1 similar issue
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/shard-glk9/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/shard-glk1/igt@[email protected]

* igt@gen9_exec_parse@allowed-all:
- shard-apl: [PASS][3] -> [DMESG-WARN][4] ([i915#1436] / [i915#1635] / [i915#716])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/shard-apl2/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/shard-apl8/igt@[email protected]

* igt@i915_module_load@reload:
- shard-apl: [PASS][5] -> [DMESG-WARN][6] ([i915#1635] / [i915#1982])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/shard-apl1/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/shard-apl8/igt@[email protected]

* igt@kms_atomic_interruptible@universal-setplane-primary:
- shard-snb: [PASS][7] -> [SKIP][8] ([fdo#109271])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/shard-snb2/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/shard-snb6/igt@[email protected]

* igt@kms_big_fb@y-tiled-64bpp-rotate-180:
- shard-glk: [PASS][9] -> [DMESG-FAIL][10] ([i915#118] / [i915#95])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/shard-glk7/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/shard-glk8/igt@[email protected]

* igt@kms_flip@basic-plain-flip@a-edp1:
- shard-skl: [PASS][11] -> [DMESG-WARN][12] ([i915#1982]) +11 similar issues
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/shard-skl8/igt@kms_flip@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/shard-skl4/igt@kms_flip@[email protected]

* igt@kms_flip@flip-vs-suspend-interruptible@a-dp1:
- shard-kbl: [PASS][13] -> [DMESG-WARN][14] ([i915#180]) +4 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/shard-kbl6/igt@kms_flip@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/shard-kbl7/igt@kms_flip@[email protected]

* igt@kms_flip@plain-flip-fb-recreate@c-edp1:
- shard-skl: [PASS][15] -> [FAIL][16] ([i915#2122])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/shard-skl4/igt@kms_flip@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/shard-skl4/igt@kms_flip@[email protected]

* igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-blt:
- shard-kbl: [PASS][17] -> [DMESG-WARN][18] ([i915#1982]) +1 similar issue
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/shard-kbl6/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/shard-kbl7/igt@[email protected]

* igt@kms_hdr@bpc-switch-dpms:
- shard-skl: [PASS][19] -> [FAIL][20] ([i915#1188]) +1 similar issue
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/shard-skl4/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/shard-skl9/igt@[email protected]

* igt@kms_plane_cursor@pipe-b-overlay-size-128:
- shard-kbl: [PASS][21] -> [DMESG-WARN][22] ([i915#78])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/shard-kbl3/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/shard-kbl2/igt@[email protected]

* igt@kms_psr@psr2_cursor_mmap_gtt:
- shard-iclb: [PASS][23] -> [SKIP][24] ([fdo#109441])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/shard-iclb2/igt@kms_psr@psr2_cursor_mmap_gtt.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/shard-iclb3/igt@kms_psr@psr2_cursor_mmap_gtt.html

* igt@perf_pmu@busy-no-semaphores@bcs0:
- shard-kbl: [PASS][25] -> [DMESG-WARN][26] ([i915#165])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/shard-kbl3/igt@perf_pmu@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/shard-kbl2/igt@perf_pmu@[email protected]

* igt@perf_pmu@module-unload:
- shard-iclb: [PASS][27] -> [DMESG-WARN][28] ([i915#1982])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/shard-iclb6/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/shard-iclb4/igt@[email protected]

#### Possible fixes ####

* igt@gem_exec_reloc@basic-concurrent0:
- shard-glk: [FAIL][29] ([i915#1930]) -> [PASS][30]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/shard-glk6/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/shard-glk4/igt@[email protected]

* igt@gem_exec_whisper@basic-queues-priority:
- shard-glk: [DMESG-WARN][31] ([i915#118] / [i915#95]) -> [PASS][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/shard-glk4/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/shard-glk1/igt@[email protected]

* igt@i915_module_load@reload:
- shard-tglb: [DMESG-WARN][33] ([i915#402]) -> [PASS][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/shard-tglb8/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/shard-tglb7/igt@[email protected]

* igt@kms_cursor_legacy@flip-vs-cursor-atomic:
- shard-glk: [DMESG-WARN][35] ([i915#1982]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/shard-glk3/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/shard-glk3/igt@[email protected]

* igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@ac-hdmi-a1-hdmi-a2:
- shard-glk: [FAIL][37] ([i915#79]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/shard-glk4/igt@kms_flip@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/shard-glk1/igt@kms_flip@[email protected]

* igt@kms_flip@flip-vs-expired-vblank-interruptible@b-dp1:
- shard-apl: [FAIL][39] ([i915#1635] / [i915#79]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/shard-apl8/igt@kms_flip@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/shard-apl3/igt@kms_flip@[email protected]

* igt@kms_frontbuffer_tracking@fbc-suspend:
- shard-kbl: [DMESG-WARN][41] ([i915#180]) -> [PASS][42] +5 similar issues
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/shard-kbl6/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/shard-kbl2/igt@[email protected]

* igt@kms_frontbuffer_tracking@psr-1p-pri-indfb-multidraw:
- shard-tglb: [DMESG-WARN][43] ([i915#1982]) -> [PASS][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/shard-tglb5/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/shard-tglb1/igt@[email protected]

* igt@kms_hdr@bpc-switch:
- shard-skl: [FAIL][45] ([i915#1188]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/shard-skl9/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/shard-skl9/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
- shard-skl: [FAIL][47] ([fdo#108145] / [i915#265]) -> [PASS][48] +1 similar issue
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/shard-skl6/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/shard-skl10/igt@[email protected]

* igt@kms_plane_cursor@pipe-a-viewport-size-128:
- shard-skl: [DMESG-WARN][49] ([i915#1982]) -> [PASS][50] +7 similar issues
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/shard-skl1/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/shard-skl9/igt@[email protected]

* igt@kms_plane_scaling@pipe-a-scaler-with-clipping-clamping:
- shard-iclb: [DMESG-WARN][51] ([i915#1982]) -> [PASS][52]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/shard-iclb3/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/shard-iclb5/igt@[email protected]

* igt@kms_psr@psr2_primary_mmap_cpu:
- shard-iclb: [SKIP][53] ([fdo#109441]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/shard-iclb8/igt@kms_psr@psr2_primary_mmap_cpu.html
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/shard-iclb2/igt@kms_psr@psr2_primary_mmap_cpu.html

* igt@kms_setmode@basic:
- shard-kbl: [FAIL][55] ([i915#31]) -> [PASS][56]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/shard-kbl1/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/shard-kbl2/igt@[email protected]

* igt@testdisplay:
- shard-kbl: [TIMEOUT][57] ([i915#1692] / [i915#1958] / [i915#2119]) -> [PASS][58]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/shard-kbl2/[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/shard-kbl2/[email protected]

#### Warnings ####

* igt@runner@aborted:
- shard-apl: ([FAIL][59], [FAIL][60]) ([i915#1610] / [i915#1635] / [i915#2110]) -> [FAIL][61] ([fdo#109271] / [i915#1635] / [i915#716])
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/shard-apl1/igt@[email protected]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8750/shard-apl7/igt@[email protected]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18178/shard-apl8/igt@[email protected]

[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[i915#118]: https://gitlab.freedesktop.org/drm/intel/issues/118
[i915#1188]: https://gitlab.freedesktop.org/drm/intel/issues/1188
[i915#1436]: https://gitlab.freedesktop.org/drm/intel/issues/1436
[i915#1610]: https://gitlab.freedesktop.org/drm/intel/issues/1610
[i915#1635]: https://gitlab.freedesktop.org/drm/intel/issues/1635
[i915#165]: https://gitlab.freedesktop.org/drm/intel/issues/165
[i915#1692]: https://gitlab.freedesktop.org/drm/intel/issues/1692
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#1930]: https://gitlab.freedesktop.org/drm/intel/issues/1930
[i915#1958]: https://gitlab.freedesktop.org/drm/intel/issues/1958
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2110]: https://gitlab.freedesktop.org/drm/intel/issues/2110
[i915#2119]: https://gitlab.freedesktop.org/drm/intel/issues/2119
[i915#2122]: https://gitlab.freedesktop.org/drm/intel/issues/2122
[i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
[i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
[i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
[i915#716]: https://gitlab.freedesktop.org/drm/intel/issues/716
[i915#78]: https://gitlab.freedesktop.org/drm/intel/issues/78
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95

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

No changes in participating hosts

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

* Linux: CI_DRM_8750 -> Patchwork_18178

CI-20190529: 20190529
CI_DRM_8750: 0714e0ca72205b9c38c4b2a09d8d5981637af2fb @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5735: 21f8204e54c122e4a0f8ca4b59e4b2db8d1ba687 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_18178: fa1446a4646bc41f7f40ae47e7f33ca41b0a637a @ 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_18178/index.html

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx