[Intel-gfx] [PATCH] drm/i915: Keep the mm.bound_list in rough LRU order

Daniel Vetter daniel at ffwll.ch
Tue Jul 28 04:31:40 PDT 2015


On Mon, Jul 27, 2015 at 10:26:26AM +0100, Chris Wilson wrote:
> When we shrink our working sets, we want to avoid stealing pages from
> objects that likely to be reused in the near future. We first look at
> inactive objects before processing active objects - but what about a
> recently active object that is about to be used again. That object's
> position in the bound_list is ordered by the time of binding, not the
> time of last use, so the most recently used inactive object could well
> be at the head of the shrink list. To compensate, give the object a bump
> to MRU when it becomes inactive (thus transitioning to the end of the
> first pass in shrink lists). Conversely, bumping on inactive makes
> bumping on active useless, since when we do have to reap from the active
> working set, everything is going to become inactive very quickly and the
> order pretty much random - just hope for the best at that point, as once
> we start stalling on active objects, we can hope that the rebinding
> neatly orders vital objects.
> 
> Suggested-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Daniel Vetter <daniel.vetter at ffwll.ch>

Queued for -next, thanks for the patch and let's see what happens. We have
a history of innocent list order changes uncovering interesting bugs ...
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list