drm/i915: Apply a cond_resched() to the saturated signaler
authorChris Wilson <[email protected]>
Tue, 4 Apr 2017 12:05:31 +0000 (13:05 +0100)
committerChris Wilson <[email protected]>
Tue, 4 Apr 2017 12:48:21 +0000 (13:48 +0100)
commita7980a640cbd339aa80f406d1786a275a2c320bc
tree48e7c5bf1a70b1a471657b5e5097de71a4ecd01c
parentb1becb88268beb72df6495e35d3d76c138d215bb
drm/i915: Apply a cond_resched() to the saturated signaler

If the engine is continually completing nops, we can saturate the
signaler and keep it working indefinitely. This angers the NMI watchdog!

A good example is to disable semaphores on snb and run igt/gem_exec_nop -
the parallel, multi-engine workloads are more than sufficient to hog the
CPU, preventing the system from even processing ICMP echo replies.

v2: Tvrtko dug into cond_resched() on x86 and found that it only
depended upon preempt_count and not tif_need_resched() - which means
that we would always call schedule() at that point.

Fixes: c81d46138da6 ("drm/i915: Convert trace-irq to the breadcrumb waiter")
Signed-off-by: Chris Wilson <[email protected]>
Cc: Mika Kuoppala <[email protected]>
Cc: Tvrtko Ursulin <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Tvrtko Ursulin <[email protected]>
drivers/gpu/drm/i915/intel_breadcrumbs.c