]> git.baikalelectronics.ru Git - kernel.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)
commitb3cd39bdc6ce9aaa340f3b0711e0252ce472194b
treec87257e17ac1b052931fab77019503bac2176c27
parentdaed3477ee174406088a94b8150d6126393fb998
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