[Intel-gfx] [PATCH] drm/i915: Protect mmaped buffers from casual eviction.

Chris Wilson chris at chris-wilson.co.uk
Wed May 12 00:57:06 CEST 2010


On Tue, 11 May 2010 09:38:36 -0700, Eric Anholt <eric at anholt.net> wrote:
> Couldn't this be more easily handled by the times where you would move
> to the tail of mmap, just move to the tail of inactive?  Since inactive
> is "obj_priv->gtt_space && !obj_priv->active" already.

The real issue is the inactive list is no longer evicted in LRU, otherwise
just moving to the end of inactive list would be ideal. In benchmarks it
is faster to evict the appropriately sized object rather than iterate
over the inactive list until enough contiguous space has been freed. The
consequence is that the page-fault-of-doom is reintroduced unless some
measure is taken to avoid it. I don't have any figures to suggest what the
average size of the mmap_list will be. As an object is only on the list
until it is used or evict-everything, then the list should be kept quite
short. As our drivers improve, the frequency at which we have to mmap
buffers should reduce as well...
-ickle

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list