Skip to content

Commit

Permalink
drm/i915/execlists: Pull tasklet interrupt-bh local to direct submission
Browse files Browse the repository at this point in the history
We dropped calling process_csb prior to handling direct submission in
order to avoid the nesting of spinlocks and lift process_csb() and the
majority of the tasklet out of irq-off. However, we do want to avoid
ksoftirqd latency in the fast path, so try and pull the interrupt-bh
local to direct submission if we can acquire the tasklet's lock.

v2: Document the read of pending[0] from outside the tasklet with
READ_ONCE.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200325120227.8044-1-chris@chris-wilson.co.uk
  • Loading branch information
Chris Wilson committed Mar 25, 2020
1 parent 032d992 commit 6670b41
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/gpu/drm/i915/gt/intel_lrc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2891,6 +2891,13 @@ static void __submit_queue_imm(struct intel_engine_cs *engine)
if (reset_in_progress(execlists))
return; /* defer until we restart the engine following reset */

/* Hopefully we clear execlists->pending[] to let us through */
if (READ_ONCE(execlists->pending[0]) &&
tasklet_trylock(&execlists->tasklet)) {
process_csb(engine);
tasklet_unlock(&execlists->tasklet);
}

__execlists_submission_tasklet(engine);
}

Expand Down

0 comments on commit 6670b41

Please sign in to comment.