All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 01/11] drm/i915/execlists: Avoid kicking the submission too early for rescheduling
Date: Mon, 26 Mar 2018 12:50:34 +0100	[thread overview]
Message-ID: <20180326115044.2505-2-chris@chris-wilson.co.uk> (raw)
In-Reply-To: <20180326115044.2505-1-chris@chris-wilson.co.uk>

If the request is still waiting on external fences, it has not yet been
submitted to the HW queue and so we can forgo kicking the submission
tasklet when re-evaluating its priority.

This should have no impact other than reducing the number of tasklet
wakeups under signal heavy workloads (e.g. switching between engines).

v2: Use prebaked container_of()

References: f6322eddaff7 ("drm/i915/preemption: Allow preemption between submission ports")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Michel Thierry <michel.thierry@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/intel_lrc.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index b4ab06b05e58..104b69e0494f 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -1051,12 +1051,16 @@ static void queue_request(struct intel_engine_cs *engine,
 	list_add_tail(&pt->link, &lookup_priolist(engine, pt, prio)->requests);
 }
 
-static void submit_queue(struct intel_engine_cs *engine, int prio)
+static void __submit_queue(struct intel_engine_cs *engine, int prio)
 {
-	if (prio > engine->execlists.queue_priority) {
 		engine->execlists.queue_priority = prio;
 		tasklet_hi_schedule(&engine->execlists.tasklet);
-	}
+}
+
+static void submit_queue(struct intel_engine_cs *engine, int prio)
+{
+	if (prio > engine->execlists.queue_priority)
+		__submit_queue(engine, prio);
 }
 
 static void execlists_submit_request(struct i915_request *request)
@@ -1189,7 +1193,10 @@ static void execlists_schedule(struct i915_request *request, int prio)
 			__list_del_entry(&pt->link);
 			queue_request(engine, pt, prio);
 		}
-		submit_queue(engine, prio);
+
+		if (prio > engine->execlists.queue_priority &&
+		    i915_sw_fence_done(&pt_to_request(pt)->submit))
+			__submit_queue(engine, prio);
 	}
 
 	spin_unlock_irq(&engine->timeline->lock);
-- 
2.16.3

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

  reply	other threads:[~2018-03-26 11:51 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-26 11:50 Forced preemption gedankenexperiment Chris Wilson
2018-03-26 11:50 ` Chris Wilson [this message]
2018-03-27 11:34   ` [PATCH 01/11] drm/i915/execlists: Avoid kicking the submission too early for rescheduling Mika Kuoppala
2018-03-27 11:47     ` Chris Wilson
2018-03-27 12:18       ` Mika Kuoppala
2018-03-27 13:34         ` Chris Wilson
2018-03-27 11:42   ` Mika Kuoppala
2018-03-26 11:50 ` [PATCH 02/11] drm/i915/execlists: Clear user-active flag on preemption completion Chris Wilson
2018-03-27 10:00   ` Chris Wilson
2018-03-27 10:01     ` Chris Wilson
2018-03-26 11:50 ` [PATCH 03/11] drm/i915: Include submission tasklet state in engine dump Chris Wilson
2018-03-27  8:37   ` Mika Kuoppala
2018-03-26 11:50 ` [PATCH 04/11] drm/i915/execlists: Refactor out complete_preempt_context() Chris Wilson
2018-03-26 11:50 ` [PATCH 05/11] drm/i915: Move engine reset prepare/finish to backends Chris Wilson
2018-03-26 11:50 ` [PATCH 06/11] drm/i915: Split execlists/guc reset prepartions Chris Wilson
2018-03-26 11:50 ` [PATCH 07/11] drm/i915/execlists: Flush pending preemption events during reset Chris Wilson
2018-03-27 11:44   ` [PATCH v2] " Chris Wilson
2018-03-27 15:33     ` Jeff McGee
2018-03-26 11:50 ` [PATCH 08/11] drm/i915/execlists: Force preemption via reset on timeout Chris Wilson
2018-03-27  8:51   ` Tvrtko Ursulin
2018-03-27  9:10     ` Chris Wilson
2018-03-27  9:23     ` Chris Wilson
2018-03-28  8:59       ` Chris Wilson
2018-03-27 15:40     ` Jeff McGee
2018-03-27 15:50   ` Jeff McGee
2018-03-26 11:50 ` [PATCH 09/11] drm/i915/preemption: Select timeout when scheduling Chris Wilson
2018-03-26 11:50 ` [PATCH 10/11] drm/i915: Use a preemption timeout to enforce interactivity Chris Wilson
2018-03-27  8:35   ` Tvrtko Ursulin
2018-03-27  8:39     ` Chris Wilson
2018-03-27  8:57       ` Tvrtko Ursulin
2018-03-26 11:50 ` [PATCH 11/11] drm/i915: Allow user control over preempt timeout on the important context Chris Wilson
2018-03-26 17:09   ` Tvrtko Ursulin
2018-03-26 19:52     ` Chris Wilson
2018-03-26 20:49       ` Chris Wilson
2018-03-26 12:08 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/11] drm/i915/execlists: Avoid kicking the submission too early for rescheduling Patchwork
2018-03-26 12:23 ` ✓ Fi.CI.BAT: success " Patchwork
2018-03-26 14:56 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-03-27 12:28 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/11] drm/i915/execlists: Avoid kicking the submission too early for rescheduling (rev2) Patchwork
2018-03-27 12:44 ` ✓ Fi.CI.BAT: success " Patchwork
2018-03-27 15:30 ` ✗ Fi.CI.IGT: 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=20180326115044.2505-2-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.