]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gt: Delay taking the spinlock for grabbing from the buffer pool
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 29 Jul 2020 08:02:45 +0000 (09:02 +0100)
committerJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Mon, 7 Sep 2020 10:14:07 +0000 (13:14 +0300)
commit06b73c2d0b65f17e698f6a662affd7a08853c86f
tree3bcc6955b25ee8a60c5568919b17565d01ee9b0d
parenta817c891c12471ce9fc285c1246372474c39a3f2
drm/i915/gt: Delay taking the spinlock for grabbing from the buffer pool

Some very low hanging fruit, but contention on the pool->lock is
noticeable between intel_gt_get_buffer_pool() and pool_retire(), with
the majority of the hold time due to the locked list iteration. If we
make the node itself RCU protected, we can perform the search for an
suitable node just under RCU, reserving taking the lock itself for
claiming the node and manipulating the list.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200729080245.8070-1-chris@chris-wilson.co.uk
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
drivers/gpu/drm/i915/gt/intel_gt_buffer_pool.c
drivers/gpu/drm/i915/gt/intel_gt_buffer_pool_types.h