From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Skip execlists_dequeue() early if the list is empty
Date: Fri, 17 Mar 2017 10:30:10 +0000 [thread overview]
Message-ID: <be9f1ee7-5cec-896a-ca21-2ea22a231977@linux.intel.com> (raw)
In-Reply-To: <20170316145305.20606-1-chris@chris-wilson.co.uk>
On 16/03/2017 14:53, Chris Wilson wrote:
> Do an early read of the execlists' queue before we take the spinlock and
> start checking. This is safe as the first writer to the execlists queue
> will cause the tasklet to be run again after a memory barrier.
Which one is the memory barrier, tasklet_hi_schedule? Wouldn't we need
an explicit one after setting engine->execlist_first in
execlists_submit_request now?
Regards,
Tvrtko
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Michał Winiarski <michal.winiarski@intel.com>
> ---
>
> With the plan to kick the tasklet before it is ready, eliminating a few
> of the heavier checks seems sensible.
> -Chris
>
> ---
> drivers/gpu/drm/i915/intel_lrc.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 89f38e7def9f..17342bc939ad 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -402,6 +402,9 @@ static void execlists_dequeue(struct intel_engine_cs *engine)
> struct rb_node *rb;
> bool submit = false;
>
> + if (!READ_ONCE(engine->execlist_first))
> + return;
> +
> last = port->request;
> if (last)
> /* WaIdleLiteRestore:bdw,skl
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-03-17 10:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-16 14:53 [PATCH] drm/i915: Skip execlists_dequeue() early if the list is empty Chris Wilson
2017-03-16 15:13 ` ✗ Fi.CI.BAT: failure for " Patchwork
2017-03-17 10:26 ` [PATCH] " Michał Winiarski
2017-03-17 10:30 ` Tvrtko Ursulin [this message]
2017-03-17 10:34 ` Chris Wilson
2017-03-17 10:44 ` Tvrtko Ursulin
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=be9f1ee7-5cec-896a-ca21-2ea22a231977@linux.intel.com \
--to=tvrtko.ursulin@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 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.