All of lore.kernel.org
 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/7] drm/i915/gt: Kick virtual siblings on timeslice out
Date: Mon, 18 May 2020 17:44:10 +0100	[thread overview]
Message-ID: <20200518164414.26640-3-chris@chris-wilson.co.uk> (raw)
In-Reply-To: <20200518164414.26640-1-chris@chris-wilson.co.uk>

If we decide to timeslice out the current virtual request, we will
unsubmit it while it is still busy (ve->context.inflight == sibling[0]).
If the virtual tasklet and then the other sibling tasklets run before we
completely schedule out the active virtual request for the preemption,
those other tasklets will see that the virtul request is still inflight
on sibling[0] and leave it be. Therefore when we finally schedule-out
the virtual request and if we see that we have passed it back to the
virtual engine, reschedule the virtual tasklet so that it may be
resubmitted on any of the siblings.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/gt/intel_lrc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
index 80885ba87db5..05486e801a63 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
@@ -1402,7 +1402,7 @@ static void kick_siblings(struct i915_request *rq, struct intel_context *ce)
 	struct virtual_engine *ve = container_of(ce, typeof(*ve), context);
 	struct i915_request *next = READ_ONCE(ve->request);
 
-	if (next && next->execution_mask & ~rq->execution_mask)
+	if (next == rq || (next && next->execution_mask & ~rq->execution_mask))
 		tasklet_hi_schedule(&ve->base.execlists.tasklet);
 }
 
-- 
2.20.1

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

  parent reply	other threads:[~2020-05-18 16:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-18 16:44 [Intel-gfx] [PATCH 1/7] drm/i915: Move saturated workload detection back to the context Chris Wilson
2020-05-18 16:44 ` [Intel-gfx] [PATCH 2/7] drm/i915/selftests: Add tests for timeslicing virtual engines Chris Wilson
2020-05-18 16:44 ` Chris Wilson [this message]
2020-05-18 16:44 ` [Intel-gfx] [PATCH 4/7] drm/i915/gt: Incorporate the virtual engine into timeslicing Chris Wilson
2020-05-18 16:44 ` [Intel-gfx] [PATCH 5/7] drm/i915/gt: Use virtual_engine during execlists_dequeue Chris Wilson
2020-05-18 16:44 ` [Intel-gfx] [PATCH 6/7] drm/i915/gt: Decouple inflight virtual engines Chris Wilson
2020-05-18 16:44 ` [Intel-gfx] [PATCH 7/7] drm/i915/gt: Resubmit the virtual engine on schedule-out Chris Wilson
2020-05-18 19:12 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/7] drm/i915: Move saturated workload detection back to the context Patchwork
2020-05-18 19:13 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2020-05-18 19:42 ` [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=20200518164414.26640-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.