drm/i915: Invalidate our pages under memory pressure
authorChris Wilson <[email protected]>
Tue, 25 Mar 2014 13:23:06 +0000 (13:23 +0000)
committerDaniel Vetter <[email protected]>
Tue, 20 May 2014 07:51:18 +0000 (09:51 +0200)
commit5537252b6b6d71fb1a8ed7395a8e5babf91953fd
treedb2c43c4a7bedbe567a483154da85ea0fdac37a0
parentb453c4dbc3af023540f61419223104cb1bb80d16
drm/i915: Invalidate our pages under memory pressure

Try to flush out dirty pages into the swapcache (and from there into the
swapfile) when under memory pressure and forced to drop GEM objects from
memory. In effect, this should just allow us to discard unused pages for
memory reclaim and to start writeback earlier.

v2: Hugh Dickins warned that explicitly starting writeback from
shrink_slab was prone to deadlocks within shmemfs.

Cc: Hugh Dickins <[email protected]>
Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Robert Beckett <[email protected]>
Reviewed-by: Rafael Barbalho <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
drivers/gpu/drm/i915/i915_gem.c