From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/5] drm/i915/execlists: Skip redundant resubmission
Date: Fri, 4 Oct 2019 11:08:08 +0100 [thread overview]
Message-ID: <37b77313-4e99-7c1c-be29-acc48d0aefc9@linux.intel.com> (raw)
In-Reply-To: <20191003210100.22250-1-chris@chris-wilson.co.uk>
On 03/10/2019 22:00, Chris Wilson wrote:
> If we unwind the active requests, and on resubmission discover that we
> intend to preempt the active context with itself, simply skip the ELSP
> submission.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> drivers/gpu/drm/i915/gt/intel_lrc.c | 17 ++++++++++++++++-
> 1 file changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
> index 431d3b8c3371..3cfea1758fd2 100644
> --- a/drivers/gpu/drm/i915/gt/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
> @@ -1739,11 +1739,26 @@ static void execlists_dequeue(struct intel_engine_cs *engine)
>
> if (submit) {
> *port = execlists_schedule_in(last, port - execlists->pending);
> - memset(port + 1, 0, (last_port - port) * sizeof(*port));
> execlists->switch_priority_hint =
> switch_prio(engine, *execlists->pending);
> +
> + /*
> + * Skip if we ended up with exactly the same set of requests,
> + * e.g. trying to timeslice a pair of ordered contexts
> + */
> + if (!memcmp(execlists->active, execlists->pending,
> + (port - execlists->pending + 1) * sizeof(*port))) {
> + do
> + execlists_schedule_out(fetch_and_zero(port));
> + while (port-- != execlists->pending);
> +
> + goto skip_submit;
> + }
> +
> + memset(port + 1, 0, (last_port - port) * sizeof(*port));
> execlists_submit_ports(engine);
> } else {
> +skip_submit:
> ring_set_paused(engine, 0);
> }
> }
>
A little bit of tracepoint noise with in/out but looks correct after I
read the new code. And I wonder if trace.pl still works after last
couple months of refactors.. :)
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-10-04 10:08 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-03 21:00 [PATCH 1/5] drm/i915/execlists: Skip redundant resubmission Chris Wilson
2019-10-03 21:00 ` [PATCH 2/5] dma-fence: Serialise signal enabling (dma_fence_enable_sw_signaling) Chris Wilson
2019-10-04 8:31 ` Tvrtko Ursulin
2019-10-04 10:11 ` [PATCH] " Chris Wilson
2019-10-04 10:18 ` Tvrtko Ursulin
2019-10-03 21:00 ` [PATCH 3/5] drm/mm: Use helpers for drm_mm_node booleans Chris Wilson
2019-10-04 8:33 ` Tvrtko Ursulin
2019-10-03 21:00 ` [PATCH 4/5] drm/mm: Convert drm_mm_node booleans to bitops Chris Wilson
2019-10-04 8:34 ` Tvrtko Ursulin
2019-10-03 21:01 ` [PATCH 5/5] drm/mm: Use clear_bit_unlock() for releasing the drm_mm_node() Chris Wilson
2019-10-04 9:15 ` Tvrtko Ursulin
2019-10-04 11:07 ` Chris Wilson
2019-10-04 11:17 ` Chris Wilson
2019-10-04 12:01 ` [Intel-gfx] " Tvrtko Ursulin
2019-10-09 15:59 ` Daniel Vetter
2019-10-03 22:38 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/5] drm/i915/execlists: Skip redundant resubmission Patchwork
2019-10-03 22:58 ` ✓ Fi.CI.BAT: success " Patchwork
2019-10-04 10:08 ` Tvrtko Ursulin [this message]
2019-10-04 10:25 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/5] drm/i915/execlists: Skip redundant resubmission (rev2) Patchwork
2019-10-04 11:36 ` ✓ Fi.CI.BAT: success " Patchwork
2019-10-04 11:53 ` ✗ Fi.CI.IGT: failure for series starting with [1/5] drm/i915/execlists: Skip redundant resubmission Patchwork
2019-10-04 17:01 ` ✗ Fi.CI.IGT: failure for series starting with [1/5] drm/i915/execlists: Skip redundant resubmission (rev2) 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=37b77313-4e99-7c1c-be29-acc48d0aefc9@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=dri-devel@lists.freedesktop.org \
--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