Skip to content

Commit c961561

Browse files
committed
drm/i915: Kick hangcheck from retire worker
Let's ensure that we cannot run indefinitely without the hangcheck worker being queued. We removed it from being kicked on every request because we were kicking it a few millions times in every hangcheck interval and only once is necessary! However, that leaves us with the issue of what if userspace never waits for a request, or runs out of resources, what if userspace just issues a request then spins on BUSY_IOCTL? Testcase: igt/gem_busy Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1468055535-19740-3-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
1 parent 232af39 commit c961561

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/gpu/drm/i915/i915_gem.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3281,10 +3281,12 @@ i915_gem_retire_work_handler(struct work_struct *work)
32813281
* We do not need to do this test under locking as in the worst-case
32823282
* we queue the retire worker once too often.
32833283
*/
3284-
if (READ_ONCE(dev_priv->gt.awake))
3284+
if (READ_ONCE(dev_priv->gt.awake)) {
3285+
i915_queue_hangcheck(dev_priv);
32853286
queue_delayed_work(dev_priv->wq,
32863287
&dev_priv->gt.retire_work,
32873288
round_jiffies_up_relative(HZ));
3289+
}
32883290
}
32893291

32903292
static void

0 commit comments

Comments
 (0)