提交 53597277 编写于 作者: C Chris Wilson

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: NChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161101084843.3961-3-chris@chris-wilson.co.uk
上级 41598162
......@@ -234,7 +234,7 @@ i915_gem_shrink(struct drm_i915_private *dev_priv,
mutex_unlock(&obj->mm.lock);
}
}
list_splice(&still_in_list, phase->list);
list_splice_tail(&still_in_list, phase->list);
}
if (flags & I915_SHRINK_BOUND)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册