From: Michel Thierry <michel.thierry@intel.com>
To: "Wang, Zhi A" <zhi.a.wang@intel.com>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>
Cc: "He, Min" <min.he@intel.com>,
"Li, Weinan Z" <weinan.z.li@intel.com>,
"Han, Xu" <xu.han@intel.com>
Subject: Re: About dealing with CSB.context element switch in execlist mode.
Date: Wed, 25 Nov 2015 12:47:55 +0000 [thread overview]
Message-ID: <5655ADFB.4050105@intel.com> (raw)
In-Reply-To: <F3B0350DF4CB6849A642218320DE483D4A517D36@SHSMSX101.ccr.corp.intel.com>
On 11/24/2015 1:33 PM, Wang, Zhi A wrote:
> Hi Gurus:
>
> I’m wondering what’s the right approach to deal with the context switch
> reason: element_switch? According to b-spec, one ELSP submission may
> include two elements, when one element is finished, HW will move to
> process next element, the previous context will be scheduled out with a
> “element_switch” context switch reason.
Correct, in fact you get 2 flags, element_switch & context_complete.
>
> I saw that i915 would try to start a new ELSP write which may contain
> two new elements when it found a “element_switch” CSB in the context
> switch handler. I’m a bit confused here, as HW may be still running a
> context at this time, I’m not sure if two new elements can be submitted
> at this time. So I think maybe my understanding about this context
> switch reason might be wrong.
The driver is trying to speed up the execution when there are +3
contexts queued. The first _new_ element you mention is in fact the
running context.
>
> Anyone can educate me how to deal with the “element_switch” CSB?
>
Let's say you have contexts A, B, C and D already in queue, so A & B are
sent to the ELSP.
After element_switch (A completed) B starts automatically, at this point
the driver will send a new execlist with B and C, effectively
lite-restoring B (note it cannot be a different context since that will
cause a preemption).
And when B completes, the driver sends C & D. Lite-restoring the 2nd ctx
of each execlist allows us to send these 4 contexts with only 3 ELSP writes.
> Thanks,
>
> Zhi.
>
-Michel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-11-25 12:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-24 13:33 About dealing with CSB.context element switch in execlist mode Wang, Zhi A
2015-11-25 12:47 ` Michel Thierry [this message]
2015-11-25 12:51 ` Wang, Zhi A
2015-11-25 13:00 ` Wang, Zhi A
2015-11-25 13:14 ` Michel Thierry
2015-11-25 13:17 ` Wang, Zhi A
2015-11-26 16:47 ` Dave Gordon
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=5655ADFB.4050105@intel.com \
--to=michel.thierry@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=min.he@intel.com \
--cc=weinan.z.li@intel.com \
--cc=xu.han@intel.com \
--cc=zhi.a.wang@intel.com \
/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