drm/i915/execlists: Switch to rb_root_cached
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 29 Jun 2018 07:53:20 +0000 (08:53 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 11 Jul 2018 13:38:45 +0000 (14:38 +0100)
commit655250a8d1aa3b18949a72869858d07ceac12799
treebf8fc60a9d4b678ca1d11fb8bed90d3e3c087072
parentcb4dc8daf4cb72d7833148a6087b425b5c20e903
drm/i915/execlists: Switch to rb_root_cached

The kernel recently gained an augmented rbtree with the purpose of
cacheing the leftmost element of the rbtree, a frequent optimisation to
avoid calls to rb_first() which is also employed by the
execlists->queue. Switch from our open-coded cache to the library.

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/20180629075348.27358-9-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/intel_engine_cs.c
drivers/gpu/drm/i915/intel_guc_submission.c
drivers/gpu/drm/i915/intel_lrc.c
drivers/gpu/drm/i915/intel_ringbuffer.h