From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 7/9] drm/i915/execlists: Reduce lock context between schedule/submit_request
Date: Fri, 5 May 2017 14:30:08 +0100 [thread overview]
Message-ID: <ddc8729f-e1e7-d87b-6417-df304389ca9d@linux.intel.com> (raw)
In-Reply-To: <20170503113759.31145-7-chris@chris-wilson.co.uk>
On 03/05/2017 12:37, Chris Wilson wrote:
> If we do not require to perform priority bumping, and we haven't yet
> submitted the request, we can update its priority in situ and skip
> acquiring the engine locks -- thus avoiding any contention between us
> and submit/execute.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> drivers/gpu/drm/i915/intel_lrc.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index fb0025627676..ca7f28795e2d 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -767,6 +767,17 @@ static void execlists_schedule(struct drm_i915_gem_request *request, int prio)
> list_safe_reset_next(dep, p, dfs_link);
> }
>
> + /* If we didn't need to bump any existing priorites, and we haven't
priorities
> + * yet submitted this request (i..e there is no porential race with
potential
> + * execlists_submit_request()), we can set our own priority and skip
> + * acquiring the engine locks.
> + */
> + if (request->priotree.priority == INT_MIN) {
> + request->priotree.priority = prio;
> + if (stack.dfs_link.next == stack.dfs_link.prev)
> + return;
Move the assignment of the priority under the if?
> + }
> +
> engine = request->engine;
> spin_lock_irq(&engine->timeline->lock);
>
>
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-05-05 13:30 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-03 11:37 [PATCH 1/9] drm/i915: Make ptr_unpack_bits() more function-like Chris Wilson
2017-05-03 11:37 ` [PATCH 2/9] drm/i915: Redefine ptr_pack_bits() and friends Chris Wilson
2017-05-03 11:37 ` [PATCH 3/9] drm/i915/execlists: Pack the count into the low bits of the port.request Chris Wilson
2017-05-05 10:49 ` Tvrtko Ursulin
2017-05-05 11:16 ` Chris Wilson
2017-05-05 11:58 ` Tvrtko Ursulin
2017-05-03 11:37 ` [PATCH 4/9] drm/i915: Don't mark an execlists context-switch when idle Chris Wilson
2017-05-03 11:37 ` [PATCH 5/9] drm/i915: Use a define for the default priority [0] Chris Wilson
2017-05-04 13:32 ` Joonas Lahtinen
2017-05-04 13:58 ` Chris Wilson
2017-05-05 8:31 ` Mika Kuoppala
2017-05-05 9:13 ` Chris Wilson
2017-05-05 9:21 ` Tvrtko Ursulin
2017-05-05 9:50 ` Chris Wilson
2017-05-03 11:37 ` [PATCH 6/9] drm/i915: Split execlist priority queue into rbtree + linked list Chris Wilson
2017-05-05 13:19 ` Tvrtko Ursulin
2017-05-05 13:32 ` Chris Wilson
2017-05-05 13:37 ` Tvrtko Ursulin
2017-05-05 13:51 ` Chris Wilson
2017-05-05 14:20 ` Tvrtko Ursulin
2017-05-05 14:26 ` Chris Wilson
2017-05-05 13:50 ` Tvrtko Ursulin
2017-05-05 14:04 ` Chris Wilson
2017-05-05 14:24 ` Tvrtko Ursulin
2017-05-03 11:37 ` [PATCH 7/9] drm/i915/execlists: Reduce lock context between schedule/submit_request Chris Wilson
2017-05-05 12:13 ` Chris Wilson
2017-05-05 13:30 ` Tvrtko Ursulin [this message]
2017-05-05 13:38 ` Chris Wilson
2017-05-03 11:37 ` [PATCH 8/9] drm/i915: Stop inlining the execlists IRQ handler Chris Wilson
2017-05-04 13:55 ` Mika Kuoppala
2017-05-03 11:37 ` [PATCH 9/9] drm/i915: Don't force serialisation on marking up execlists irq posted Chris Wilson
2017-05-05 13:34 ` Tvrtko Ursulin
2017-05-03 12:25 ` ✓ Fi.CI.BAT: success for series starting with [1/9] drm/i915: Make ptr_unpack_bits() more function-like 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=ddc8729f-e1e7-d87b-6417-df304389ca9d@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.