]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915; Preallocate the lazy request
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 4 Sep 2013 09:45:52 +0000 (10:45 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 5 Sep 2013 10:03:53 +0000 (12:03 +0200)
commit8e714352978f6e5947d084ac71add2e3bcede34c
tree11f5b83d1a88a9aa1683a28356ac617845862999
parent0893440a5658473fff0b5be78dba8e95a2b7b57d
drm/i915; Preallocate the lazy request

It is possible for us to be forced to perform an allocation for the lazy
request whilst running the shrinker. This allocation may fail, leaving
us unable to reclaim any memory leading to premature OOM. A neat
solution to the problem is to preallocate the request at the same time
as acquiring the seqno for the ring transaction. This means that we can
report ENOMEM prior to touching the rings.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/intel_ringbuffer.c
drivers/gpu/drm/i915/intel_ringbuffer.h