aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2018-05-07 09:57:25 -0400
committerChris Wilson <chris@chris-wilson.co.uk>2018-05-08 09:58:48 -0400
commit4f6d8fcf1a53d4d544d9a13f70cb2669572b7ecb (patch)
treee509da31fef92988538ae128f0fbfd8d2c92c7a8
parent4cdf65ce8cc28e72089605250b887ab70e10f750 (diff)
drm/i915: Flush submission tasklet after bumping priority
When called from process context tasklet_schedule() defers itself to ksoftirqd. From experience this may cause unacceptable latencies of over 200ms in executing the submission tasklet, our goal is to reprioritise the HW execution queue and trigger HW preemption immediately, so disable bh over the call to schedule and force the tasklet to run afterwards if scheduled. v2: Keep rcu_read_lock() around for PREEMPT_RCU Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180507135731.10587-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 5ece6ae4bdff..89bf5d67cb74 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -578,10 +578,12 @@ static void __fence_set_priority(struct dma_fence *fence,
578 rq = to_request(fence); 578 rq = to_request(fence);
579 engine = rq->engine; 579 engine = rq->engine;
580 580
581 rcu_read_lock(); 581 local_bh_disable();
582 rcu_read_lock(); /* RCU serialisation for set-wedged protection */
582 if (engine->schedule) 583 if (engine->schedule)
583 engine->schedule(rq, attr); 584 engine->schedule(rq, attr);
584 rcu_read_unlock(); 585 rcu_read_unlock();
586 local_bh_enable(); /* kick the tasklets if queues were reprioritised */
585} 587}
586 588
587static void fence_set_priority(struct dma_fence *fence, 589static void fence_set_priority(struct dma_fence *fence,