drm/i915/shrinker: Hook up vmap allocation failure notifier
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 4 Apr 2016 13:46:43 +0000 (14:46 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 5 Apr 2016 10:13:15 +0000 (11:13 +0100)
commite87666b52f00fdb373349c4e6e1c09ced964e3c5
tree101a7019c36f298dd720cb3ddfd84f60abd42f0c
parent4da56b99d99e5a7df2b7f11e87bfea935f909732
drm/i915/shrinker: Hook up vmap allocation failure notifier

If the core runs out of vmap address space, it will call a notifier in
case any driver can reap some of its vmaps. As i915.ko is possibily
holding onto vmap address space that could be recovered, hook into the
notifier chain and try and reap objects holding onto vmaps.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Roman Pen <r.peniaev@gmail.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Mika Kahola <mika.kahola@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1459777603-23618-4-git-send-email-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem_shrinker.c