[Intel-gfx] [PATCH] drm/i915: Protect mmaped buffers from casual eviction.
chris at chris-wilson.co.uk
Tue May 11 15:57:06 PDT 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...
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx