public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/execlists: Explain why we skip an ELSP update if port[1] is active
Date: Fri, 29 Sep 2017 16:21:06 +0300	[thread overview]
Message-ID: <874lrl4p4t.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <150668613081.27384.14360609620150446202@mail.alporthouse.com>

Chris Wilson <chris@chris-wilson.co.uk> writes:

> Quoting Chris Wilson (2017-09-29 11:45:57)
>> We coalesce onto an active port[0], but not onto an active port[1]
>> despite it being the same mechanism. So explain the complications that
>> make skipping the first active port and coalescing onto the second
>> active port intractable (at least while keeping some resemblance of
>> sanity).
>> 
>> Suggested-by: Mika Kuoppala <mika.kuoppala@intel.com>
>> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>> Cc: Mika Kuoppala <mika.kuoppala@intel.com>
>> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
>> ---
>>  drivers/gpu/drm/i915/intel_lrc.c | 20 ++++++++++++++++++++
>>  1 file changed, 20 insertions(+)
>> 
>> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
>> index bc3fc4cd039e..cc5574ff56c8 100644
>> --- a/drivers/gpu/drm/i915/intel_lrc.c
>> +++ b/drivers/gpu/drm/i915/intel_lrc.c
>> @@ -579,6 +579,26 @@ static void execlists_dequeue(struct intel_engine_cs *engine)
>>                         execlists->preempt = true;
>>                         goto unlock;
>>                 } else {
>> +                       /*
>> +                        * In theory, we could coalesce more requests onto
>> +                        * the second port (the first port is active, with
>> +                        * no preemptions pending). However, that means we
>> +                        * then have to deal with the possible lite-restore
>> +                        * of the second port (as we submit the ELSP, there
>> +                        * may be a context-switch) but also we may complete
>> +                        * the resubmission before the context-switch. Ergo,
>> +                        * coalescing onto the second port will cause a
>> +                        * preemption event, but we cannot predict whether
>> +                        * that will affect port[0] or port[1].
>> +                        *
>> +                        * If the second port is already active, we can wait
>> +                        * until the next context-switch before contemplating
>> +                        * new requests. The GPU will be busy and we should be
>> +                        * able to resubmit the new ELSP before it idles,
>> +                        * avoiding pipeline bubbles (momentary pauses where
>> +                        * the driver is unable to keep up the supply of new
>> +                        * work).
>> +                        */
>>                         if (port_count(&port[1]))
>>                                 goto unlock;
>
> I think I'll squash this into the "Preemption!" patch if we're happy
> with the explanation?

Yup please do.
-Mika

> -Chris
> _______________________________________________
> 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

      reply	other threads:[~2017-09-29 13:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-29 10:45 [PATCH] drm/i915/execlists: Explain why we skip an ELSP update if port[1] is active Chris Wilson
2017-09-29 10:52 ` ✗ Fi.CI.BAT: failure for " Patchwork
2017-09-29 11:55 ` [PATCH] " Chris Wilson
2017-09-29 13:21   ` 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=874lrl4p4t.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