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>
This commit is contained in:

committed by
Daniel Vetter

parent
1823521d2b
commit
3c0e234c84
@@ -140,6 +140,7 @@ struct intel_ring_buffer {
|
||||
/**
|
||||
* Do we have some not yet emitted requests outstanding?
|
||||
*/
|
||||
struct drm_i915_gem_request *preallocated_lazy_request;
|
||||
u32 outstanding_lazy_seqno;
|
||||
bool gpu_caches_dirty;
|
||||
bool fbc_dirty;
|
||||
|
Reference in New Issue
Block a user