From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Subject: Re: [Intel-gfx] [PATCH 1/3] drm/i915/execlists: Lift opportunistic process_csb to before engine lock
Date: Sat, 13 Jun 2020 00:56:20 +0300 [thread overview]
Message-ID: <87imfwrlrv.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20200612142551.30956-1-chris@chris-wilson.co.uk>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> Since the process_csb() does not require us to hold the
> engine->active.lock, we can move the opportunistic flush before
> direction submission to outside of the lock.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/gt/intel_lrc.c | 21 ++++++++++++++-------
> 1 file changed, 14 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
> index 5ab0ed35af84..e866b8d721ed 100644
> --- a/drivers/gpu/drm/i915/gt/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
> @@ -3170,13 +3170,6 @@ static void __submit_queue_imm(struct intel_engine_cs *engine)
> if (reset_in_progress(execlists))
> return; /* defer until we restart the engine following reset */
>
> - /* Hopefully we clear execlists->pending[] to let us through */
> - if (READ_ONCE(execlists->pending[0]) &&
> - tasklet_trylock(&execlists->tasklet)) {
> - process_csb(engine);
> - tasklet_unlock(&execlists->tasklet);
> - }
> -
> __execlists_submission_tasklet(engine);
> }
>
> @@ -3199,11 +3192,25 @@ static bool ancestor_on_hold(const struct intel_engine_cs *engine,
> return !list_empty(&engine->active.hold) && hold_request(rq);
> }
>
> +static void flush_csb(struct intel_engine_cs *engine)
> +{
> + struct intel_engine_execlists *el = &engine->execlists;
> +
> + if (READ_ONCE(el->pending[0]) && tasklet_trylock(&el->tasklet)) {
> + if (!reset_in_progress(el))
> + process_csb(engine);
> + tasklet_unlock(&el->tasklet);
> + }
> +}
> +
> static void execlists_submit_request(struct i915_request *request)
> {
> struct intel_engine_cs *engine = request->engine;
> unsigned long flags;
>
> + /* Hopefully we clear execlists->pending[] to let us through */
> + flush_csb(engine);
> +
> /* Will be called from irq-context when using foreign fences. */
> spin_lock_irqsave(&engine->active.lock, flags);
>
> --
> 2.20.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2020-06-12 21:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-12 14:25 [Intel-gfx] [PATCH 1/3] drm/i915/execlists: Lift opportunistic process_csb to before engine lock Chris Wilson
2020-06-12 14:25 ` [Intel-gfx] [PATCH 2/3] drm/i915/execlists: Replace direct submit with direct call to tasklet Chris Wilson
2020-06-12 14:25 ` [Intel-gfx] [PATCH 3/3] drm/i915/execlists: Defer schedule_out until after the next dequeue Chris Wilson
2020-06-12 15:01 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [1/3] drm/i915/execlists: Lift opportunistic process_csb to before engine lock Patchwork
2020-06-12 21:56 ` Mika Kuoppala [this message]
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=87imfwrlrv.fsf@gaia.fi.intel.com \
--to=mika.kuoppala@linux.intel.com \
--cc=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