From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 4/4] drm/i915: Remove the spin-request during execbuf await_request
Date: Wed, 7 Jun 2017 11:22:24 +0100 [thread overview]
Message-ID: <95bc18e4-49eb-986c-b018-06f60a2007e7@linux.intel.com> (raw)
In-Reply-To: <20170605102619.4679-4-chris@chris-wilson.co.uk>
On 05/06/2017 11:26, Chris Wilson wrote:
> Originally we would enable and disable the breadcrumb interrupt
> immediately on demand. This was slow enough to have a large impact
> (>30%) on tasks that hopped between engines. However, by using a shadow
> to keep the irq alive for an extra interrupt (see commit 67b807a89230
> ("drm/i915: Delay disabling the user interrupt for breadcrumbs")) and
> by recently reducing the cost in adding ourselves to the signal tree, we
> no longer need to spin-request during await_request to avoid delays in
> throughput tests. Without the earlier patches to stop the wakeup when
> signaling if the irq was already active, we saw no improvement in
> execbuf overhead (and corresponding contention in other clients) despite
> the removal of the spinner in a simple test like glxgears. This means
> that will be scenarios where now we spend longer enabling the interrupt
"There will be" I guess?
> than we would have spent spinning, but these are not likely to have as
> noticeable an impact as the high frequency test cases (where there
> should not be any regression).
>
> Ulterior motive: generalising the engine->sync_to to handle different
> types of semaphores and non-semaphores.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Oscar Mateo <oscar.mateo@intel.com>
> ---
> drivers/gpu/drm/i915/i915_gem_request.c | 18 ++++++------------
> 1 file changed, 6 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_request.c b/drivers/gpu/drm/i915/i915_gem_request.c
> index 46d869e26b4d..8c59c79cbd8b 100644
> --- a/drivers/gpu/drm/i915/i915_gem_request.c
> +++ b/drivers/gpu/drm/i915/i915_gem_request.c
> @@ -683,7 +683,6 @@ static int
> i915_gem_request_await_request(struct drm_i915_gem_request *to,
> struct drm_i915_gem_request *from)
> {
> - u32 seqno;
> int ret;
>
> GEM_BUG_ON(to == from);
> @@ -707,18 +706,14 @@ i915_gem_request_await_request(struct drm_i915_gem_request *to,
> return ret < 0 ? ret : 0;
> }
>
> - seqno = i915_gem_request_global_seqno(from);
> - if (!seqno)
> - goto await_dma_fence;
> + if (to->engine->semaphore.sync_to) {
> + u32 seqno;
>
> - if (!to->engine->semaphore.sync_to) {
> - if (!__i915_gem_request_started(from, seqno))
> - goto await_dma_fence;
> + GEM_BUG_ON(!from->engine->semaphore.signal);
>
> - if (!__i915_spin_request(from, seqno, TASK_INTERRUPTIBLE, 2))
> + seqno = i915_gem_request_global_seqno(from);
> + if (!seqno)
> goto await_dma_fence;
> - } else {
> - GEM_BUG_ON(!from->engine->semaphore.signal);
>
> if (seqno <= to->timeline->global_sync[from->engine->id])
> return 0;
> @@ -729,10 +724,9 @@ i915_gem_request_await_request(struct drm_i915_gem_request *to,
> return ret;
>
> to->timeline->global_sync[from->engine->id] = seqno;
> + return 0;
> }
>
> - return 0;
> -
> await_dma_fence:
> ret = i915_sw_fence_await_dma_fence(&to->submit,
> &from->fence, 0,
>
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:[~2017-06-07 10:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-05 10:26 [PATCH 1/4] drm/i915: Check signaled state after enabling signaling Chris Wilson
2017-06-05 10:26 ` [PATCH 2/4] drm/i915: Report back whether the irq was armed when adding the waiter Chris Wilson
2017-06-08 10:09 ` Joonas Lahtinen
2017-06-08 10:12 ` Mika Kuoppala
2017-06-05 10:26 ` [PATCH 3/4] drm/i915: Skip adding the request to the signal tree is complete Chris Wilson
2017-06-08 9:47 ` Joonas Lahtinen
2017-06-05 10:26 ` [PATCH 4/4] drm/i915: Remove the spin-request during execbuf await_request Chris Wilson
2017-06-07 10:22 ` Tvrtko Ursulin [this message]
2017-06-08 10:02 ` Joonas Lahtinen
2017-06-08 10:07 ` Chris Wilson
2017-06-05 10:54 ` ✓ Fi.CI.BAT: success for series starting with [1/4] drm/i915: Check signaled state after enabling signaling Patchwork
2017-06-05 10:55 ` [PATCH 1/4] " Mika Kuoppala
2017-06-08 9:32 ` Joonas Lahtinen
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=95bc18e4-49eb-986c-b018-06f60a2007e7@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox