]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Move CSB MMIO reads out of the execlists lock
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Thu, 17 Mar 2016 12:59:46 +0000 (12:59 +0000)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Fri, 18 Mar 2016 10:25:56 +0000 (10:25 +0000)
commitda96eaeb35f6a1991289a0b63ec8df21648e7019
treef76e05c8fd731ca54fa6fa021684fecf5faad582
parent3ea605dfd64e943238753cb7ae572b9ebf547a25
drm/i915: Move CSB MMIO reads out of the execlists lock

By reading the CSB (slow MMIO accesses) into a temporary local
buffer we can decrease the duration of holding the execlist
lock.

Main advantage is that during heavy batch buffer submission we
reduce the execlist lock contention, which should decrease the
latency and CPU usage between the submitting userspace process
and interrupt handling.

Downside is that we need to grab and relase the forcewake twice,
but as the below numbers will show this is completely hidden
by the primary gains.

Testing with "gem_latency -n 100" (submit batch buffers with a
hundred nops each) shows more than doubling of the throughput
and more than halving of the dispatch latency, overall latency
and CPU time spend in the submitting process.

Submitting empty batches ("gem_latency -n 0") does not seem
significantly affected by this change with throughput and CPU
time improving by half a percent, and overall latency worsening
by the same amount.

Above tests were done in a hundred runs on a big core Broadwell.

v2:
  * Overflow protection to local CSB buffer.
  * Use closer dev_priv in execlists_submit_requests. (Chris Wilson)

v3: Rebase.

v4: Added commend about irq needed to be disabled in
    execlists_submit_request. (Chris Wilson)

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilsno <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/1458219586-20452-1-git-send-email-tvrtko.ursulin@linux.intel.com
drivers/gpu/drm/i915/intel_lrc.c