]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Move the recently scanned objects to the tail after shrinking
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 1 Nov 2016 08:48:43 +0000 (08:48 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 1 Nov 2016 09:30:09 +0000 (09:30 +0000)
commit6029702e3886b19fc73f1adbed4948863031a32d
treefdc8524d2e671aeaad0006bb0ffa4266f102ff09
parentd099c14ed5c23f4334cc9b19773599196d0de544
drm/i915: Move the recently scanned objects to the tail after shrinking

During shrinking, we walk over the list of objects searching for
victims. Any that are not removed are put back into the global list.
Currently, they are put back in order (at the front) which means they
will be first to be scanned again. If we instead move them to the rear
of the list, we will scan new potential victims on the next pass and
waste less time rescanning unshrinkable objects. Normally the lists are
kept in rough order to shrinking (with object least frequently used at
the start), by moving just scanned objects to the rear we are
acknowledging that they are still in use.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161101084843.3961-3-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_shrinker.c