]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit77c2b71acf294644737cebce5cb8a2268de4c2fe
tree36342293eab3bb747e52a5d1ac4157b963400afb
parentaaf34777f27ffe67df6d8da7d1e7a584886dc9f1
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