]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Prefer to report ENOMEM rather than incur the oom for gfx allocations
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 22 Mar 2017 11:05:21 +0000 (11:05 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 22 Mar 2017 19:26:46 +0000 (19:26 +0000)
commit07f0f46c9f814cbb3ddfdde8f32ac35a25bb09a1
tree569e718282ede95838583f3e69f5eb070c9d4de5
parenta9140e4bb9eb7e5c50ee3439eb5aac9313cf5941
drm/i915: Prefer to report ENOMEM rather than incur the oom for gfx allocations

Since gfx allocations tend to be large, unmovable and disposable, report
the allocation failure back to userspace as an ENOMEM rather than incur
the oomkiller. We have already tried to make room by purging our own
cached gfx objects, and the oomkiller doesn't attribute ownership of gfx
objects so will likely pick the wrong candidate. Instead, let userspace
see the ENOMEM.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20170322110521.29930-1-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem.c