]> bbs.cooldavid.org Git - net-next-2.6.git/commit
drm/i915: Maintain LRU order of inactive objects upon access by CPU (v2)
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 7 Aug 2010 20:45:03 +0000 (21:45 +0100)
committerEric Anholt <eric@anholt.net>
Mon, 9 Aug 2010 18:24:33 +0000 (11:24 -0700)
commit7d1c4804ae98cdee572d7d10d8a5deaa2e686285
treec87257e17ac1b052931fab77019503bac2176c27
parentcd377ea93f34cbd6ec49c868b66a5a7ab184775c
drm/i915: Maintain LRU order of inactive objects upon access by CPU (v2)

In order to reduce the penalty of fallbacks under memory pressure and to
avoid a potential immediate ping-pong of evicting a mmaped buffer, we
move the object to the tail of the inactive list when a page is freshly
faulted or the object is moved into the CPU domain.

We choose not to protect the CPU objects from casual eviction,
preferring to keep the GPU active for as long as possible.

v2: Daniel Vetter found a bug where I forgot that pinned objects are
kept off the inactive list.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/i915/i915_gem.c