drm/i915: Include bound and active pages in the count of shrinkable objects
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 25 Mar 2014 13:23:04 +0000 (13:23 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 20 May 2014 07:46:06 +0000 (09:46 +0200)
commitceabbba524fb43989875f66a6c06d7ce0410fe5c
tree3e871eb63c75bc85d5958d4f2b67152be85636f2
parent0820baf39bd95dcbbc3600bd7f50b137f41ebb8a
drm/i915: Include bound and active pages in the count of shrinkable objects

When the machine is under a lot of memory pressure and being stressed by
multiple GPU threads, we quite often report fewer than shrinker->batch
(i.e. SHRINK_BATCH) pages to be freed. This causes the shrink_control to
skip calling into i915.ko to release pages, despite the GPU holding onto
most of the physical pages in its active lists.

References: https://bugs.freedesktop.org/show_bug.cgi?id=72742
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Robert Beckett <robert.beckett@intel.com>
Reviewed-by: Rafael Barbalho <rafael.barbalho@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c