]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Selectively enable self-reclaim
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 27 Jan 2010 13:36:32 +0000 (13:36 +0000)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 27 Jan 2010 17:26:43 +0000 (09:26 -0800)
commitfe90585e2de74005b88b7a99f7f03212a6bfbdcc
tree986b06ebf3f585f78a7e11cae39d5fdb7251c757
parentb3cb69baa4859fa36c7f480e1eadc3136dab2124
drm/i915: Selectively enable self-reclaim

Having missed the ENOMEM return via i915_gem_fault(), there are probably
other paths that I also missed. By not enabling NORETRY by default these
paths can run the shrinker and take memory from the system (but not from
our own inactive lists because our shrinker can not run whilst we hold
the struct mutex) and this may allow the system to survive a little longer
whilst our drivers consume all available memory.

References:
  OOM killer unexpectedly called with kernel 2.6.32
  http://bugzilla.kernel.org/show_bug.cgi?id=14933

v2: Pass gfp into page mapping.
v3: Use new read_cache_page_gfp() instead of open-coding.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Eric Anholt <eric@anholt.net>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/gpu/drm/drm_gem.c
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c