diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-10-24 21:50:53 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-10-25 12:13:02 +0100 |
commit | 753bdbd001dca74f9f4528d7be415801f043748a (patch) | |
tree | 60ef4e56ccc08ff2e1632dc452e6633d45bfec3d /drivers/gpu/drm/i915/i915_gem_evict.c | |
parent | cfddadc98abc85f478c92187c944e0ee963f741b (diff) |
drm/i915: Call cond_resched() before repeating i915_gem_evict_something()
Insert a breakpoint, a chance to escape back to the scheduler and run
something else for a bit, if we find that the GGTT is full and needs to
be idled in order to make some room. In practice, this should only be an
issue in stress tests as the wait itself will normally give the chance
for the scheduler to intervene and make progress.
References: https://bugs.freedesktop.org/show_bug.cgi?id=103438
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171024205053.7845-1-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_evict.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_evict.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_evict.c b/drivers/gpu/drm/i915/i915_gem_evict.c index 8daa8a78cdc0..a6b769994d8d 100644 --- a/drivers/gpu/drm/i915/i915_gem_evict.c +++ b/drivers/gpu/drm/i915/i915_gem_evict.c @@ -216,6 +216,7 @@ search_again: if (ret) return ret; + cond_resched(); goto search_again; } |