]> bbs.cooldavid.org Git - net-next-2.6.git/commit - drivers/gpu/drm/i915/i915_gem.c
drm/i915: Truncate the shmem backing pages on purge
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 7 Aug 2010 10:01:30 +0000 (11:01 +0100)
committerEric Anholt <eric@anholt.net>
Mon, 9 Aug 2010 18:24:34 +0000 (11:24 -0700)
commitae9fed6b601821d70928797c56da0e2008ef840d
tree36342293eab3bb747e52a5d1ac4157b963400afb
parent20a0945951705246278f43641bb13611c030e112
drm/i915: Truncate the shmem backing pages on purge

shmfs doesn't actually implement i_ops->truncate() so we were not
immedatiately releasing the backing pages when shrinking the gfx cache
under OOM. Instead use a combination of truncate_inode_pages() and
i_ops->truncate_range() as is used by shmem_delete_inode().

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