intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Subject: [Intel-gfx] [PATCH 3/5] drm/i915/gt: Only retire on the last breadcrumb if the last request
Date: Thu,  7 Jan 2021 22:17:22 +0000	[thread overview]
Message-ID: <20210107221724.10036-3-chris@chris-wilson.co.uk> (raw)
In-Reply-To: <20210107221724.10036-1-chris@chris-wilson.co.uk>

We use the completion of the last active breadcrumb to retire the
requests along a timeline. This is purely opportunistic as nothing
guarantees that any particular timeline is terminated by a breadcrumb;
except for the parking the engine. We explicitly add a breadcrumb to
parking the engine so that we park quickly and do an explicit retire
upon signaling to reduce the latency dramatically.

With scheduling, we anticipate retiring completed timelines as a matter
of course. Performing the same action from inside the breadcrumbs is
intended to provide similar functionality for legacy ringbuffer
submission.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/gt/intel_breadcrumbs.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c b/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c
index 7137b6f24f55..6996e22ba65b 100644
--- a/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c
+++ b/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c
@@ -257,17 +257,19 @@ static void signal_irq_work(struct irq_work *work)
 			list_del_rcu(&rq->signal_link);
 			release = remove_signaling_context(b, ce);
 			spin_unlock(&ce->signal_lock);
+			if (release) {
+				if (list_is_last_rcu(&rq->link,
+						     &ce->timeline->requests))
+					add_retire(b, ce->timeline);
+
+				intel_context_put(ce);
+			}
 
 			if (__dma_fence_signal(&rq->fence))
 				/* We own signal_node now, xfer to local list */
 				signal = slist_add(&rq->signal_node, signal);
 			else
 				i915_request_put(rq);
-
-			if (release) {
-				add_retire(b, ce->timeline);
-				intel_context_put(ce);
-			}
 		}
 	}
 	atomic_dec(&b->signaler_active);
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2021-01-07 22:17 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-07 22:17 [Intel-gfx] [PATCH 1/5] drm/i915/selftests: Skip unstable timing measurements Chris Wilson
2021-01-07 22:17 ` [Intel-gfx] [PATCH 2/5] drm/i915/gt: Restore ce->signal flush before releasing virtual engine Chris Wilson
2021-01-08 15:18   ` Andi Shyti
2021-01-08 15:24     ` Chris Wilson
2021-01-08 15:54       ` Andi Shyti
2021-01-07 22:17 ` Chris Wilson [this message]
2021-01-08 15:55   ` [Intel-gfx] [PATCH 3/5] drm/i915/gt: Only retire on the last breadcrumb if the last request Andi Shyti
2021-01-07 22:17 ` [Intel-gfx] [PATCH 4/5] drm/i915/gt: Only disable preemption on gen8 render engines Chris Wilson
2021-01-08 15:24   ` Andi Shyti
2021-01-07 22:17 ` [Intel-gfx] [PATCH 5/5] drm/i915/gt: Disable arbitration on no-preempt requests Chris Wilson
2021-01-08 15:27   ` Andi Shyti
2021-01-07 23:07 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/5] drm/i915/selftests: Skip unstable timing measurements Patchwork
2021-01-07 23:09 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-01-07 23:38 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2021-01-08  0:16 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/5] drm/i915/selftests: Skip unstable timing measurements (rev2) Patchwork
2021-01-08  0:18 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-01-08  0:45 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-01-08  2:59 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2021-01-08 12:26 ` [Intel-gfx] [PATCH 1/5] drm/i915/selftests: Skip unstable timing measurements Andi Shyti
2021-01-08 13:26   ` Chris Wilson
2021-01-08 13:51     ` Andi Shyti
2021-01-08 13:54       ` Chris Wilson
2021-01-08 15:04         ` Andi Shyti
2021-01-08 13:28 ` [Intel-gfx] [PATCH] " Chris Wilson
2021-01-08 15:14   ` Chris Wilson
2021-01-08 15:25     ` Andi Shyti
2021-01-08 18:14 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with drm/i915/selftests: Skip unstable timing measurements (rev4) Patchwork
2021-01-08 18:16 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-01-08 18:45 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210107221724.10036-3-chris@chris-wilson.co.uk \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).