aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-05-13 06:57:21 -0400
committerChris Wilson <chris@chris-wilson.co.uk>2016-05-13 07:38:59 -0400
commite6db7469081d13700e12ae6b128091ca8eeffc3f (patch)
treecd32d0de06536d3a0223f5d171fc705a3181a9d9
parentbdb04614d8461c781801afe074b1a1c766135c30 (diff)
drm/i915: Stop retiring requests from busy/wait ioctls
In order to reduce the workload of the caller, we do not want to actually have to retire requests of others when checking the busy status of this object. This applies to both busy/wait ioctls as the wait ioctl has a semantically equivalent mode to the busy ioctl. At the present time, this is only a minor improvement to reduce the workload of the busy ioctl under the struct_mutex which helps to reduce its impact upon contention of struct_mutex. However, since it is mostly a victim in highly contended scenarios, the impact is very minor until we can eliminate the struct_mutex requirement for busy-ioctl in the near future. v2: Mention the patches intended limited impact. It is just paving the way for greater changes whilst reducing the impact of a bugfix in the next patch. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1463137042-9669-3-git-send-email-chris@chris-wilson.co.uk
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 8439867dc654..474c0272e73d 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3069,14 +3069,8 @@ i915_gem_object_flush_active(struct drm_i915_gem_object *obj)
3069 if (req == NULL) 3069 if (req == NULL)
3070 continue; 3070 continue;
3071 3071
3072 if (list_empty(&req->list)) 3072 if (i915_gem_request_completed(req, true))
3073 goto retire;
3074
3075 if (i915_gem_request_completed(req, true)) {
3076 __i915_gem_request_retire__upto(req);
3077retire:
3078 i915_gem_object_retire__read(obj, i); 3073 i915_gem_object_retire__read(obj, i);
3079 }
3080 } 3074 }
3081 3075
3082 return 0; 3076 return 0;