[Intel-gfx] [PATCH v3 08/14] drm/i915/scheduler: Execute requests in order of priorities
Chris Wilson
chris at chris-wilson.co.uk
Mon Nov 14 11:41:13 UTC 2016
On Mon, Nov 14, 2016 at 11:15:52AM +0000, Tvrtko Ursulin wrote:
> On 14/11/2016 08:56, Chris Wilson wrote:
> >+static void execlists_schedule(struct drm_i915_gem_request *request, int prio)
> >+{
> >+ struct intel_engine_cs *engine = NULL;
> >+ struct i915_dependency *dep, *p;
> >+ struct i915_dependency stack;
> >+ LIST_HEAD(dfs);
> >+
> >+ if (prio <= READ_ONCE(request->priotree.priority))
> >+ return;
> >+
> >+ /* Need BKL in order to use the temporary link inside i915_dependency */
> >+ lockdep_assert_held(&request->i915->drm.struct_mutex);
> >+
> >+ stack.signaler = &request->priotree;
> >+ list_add(&stack.dfs_link, &dfs);
> >+
> >+ /* Recursively bump all dependent priorities to match the new request */
>
> Missed last time round that the comment needs updating.
It still is a recursive design though, just flat. That one word was
saving a paragraph :|
I think the easiest way to describe what the code is doing here is to
show the recursive version in the comment and then hope for inspiration
in describing how that maps onto the search list.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list