]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Convert execbuf to use struct-of-array packing for critical fields
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 16 Aug 2017 08:52:06 +0000 (09:52 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 18 Aug 2017 10:57:36 +0000 (11:57 +0100)
commit7e8c6a51e9cb3c87f6aa7c392aa39786e6543b70
tree6da86f21d43db7debd99d0444551604dd4ad678e
parentd288815a878b5bc73c4310ab9a65f19fd34e3e0d
drm/i915: Convert execbuf to use struct-of-array packing for critical fields

When userspace is doing most of the work, avoiding relocs (using
NO_RELOC) and opting out of implicit synchronisation (using ASYNC), we
still spend a lot of time processing the arrays in execbuf, even though
we now should have nothing to do most of the time. One issue that
becomes readily apparent in profiling anv is that iterating over the
large execobj[] is unfriendly to the loop prefetchers of the CPU and it
much prefers iterating over a pair of arrays rather than one big array.

v2: Clear vma[] on construction to handle errors during vma lookup

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170816085210.4199-3-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_evict.c
drivers/gpu/drm/i915/i915_gem_execbuffer.c
drivers/gpu/drm/i915/i915_vma.h