* [CI 1/2] drm/i915: Drop racy markup of missed-irqs from idle-worker
@ 2016-07-24 9:10 Chris Wilson
2016-07-24 9:10 ` [CI 2/2] drm/i915: Update the breadcrumb interrupt counter before enabling Chris Wilson
2016-07-24 9:46 ` ✓ Ro.CI.BAT: success for series starting with [CI,1/2] drm/i915: Drop racy markup of missed-irqs from idle-worker Patchwork
0 siblings, 2 replies; 3+ messages in thread
From: Chris Wilson @ 2016-07-24 9:10 UTC (permalink / raw)
To: intel-gfx
During the idle-worker we disable the hangcheck and so kick any waiters
that should have been completed (since the GPU is now idle). Unlike the
hangcheck, we do not take any care to avoid the race between the irq
handler and ourselves, and so it is possible for us to declare a missed
interrupt even as the bottom-half is being scheduled to run. Let's
ignore this race to stop a potential false-positive error.
References: https://bugs.freedesktop.org/show_bug.cgi?id=96974
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
---
drivers/gpu/drm/i915/i915_gem.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 40047eb48826..c8436639b3ed 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2705,11 +2705,14 @@ i915_gem_idle_work_handler(struct work_struct *work)
dev_priv->gt.awake = false;
rearm_hangcheck = false;
+ /* As we have disabled hangcheck, we need to unstick any waiters still
+ * hanging around. However, as we may be racing against the interrupt
+ * handler or the waiters themselves, we skip enabling the fake-irq.
+ */
stuck_engines = intel_kick_waiters(dev_priv);
- if (unlikely(stuck_engines)) {
- DRM_DEBUG_DRIVER("kicked stuck waiters...missed irq\n");
- dev_priv->gpu_error.missed_irq_rings |= stuck_engines;
- }
+ if (unlikely(stuck_engines))
+ DRM_DEBUG_DRIVER("kicked stuck waiters (%x)...missed irq?\n",
+ stuck_engines);
if (INTEL_GEN(dev_priv) >= 6)
gen6_rps_idle(dev_priv);
--
2.8.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [CI 2/2] drm/i915: Update the breadcrumb interrupt counter before enabling
2016-07-24 9:10 [CI 1/2] drm/i915: Drop racy markup of missed-irqs from idle-worker Chris Wilson
@ 2016-07-24 9:10 ` Chris Wilson
2016-07-24 9:46 ` ✓ Ro.CI.BAT: success for series starting with [CI,1/2] drm/i915: Drop racy markup of missed-irqs from idle-worker Patchwork
1 sibling, 0 replies; 3+ messages in thread
From: Chris Wilson @ 2016-07-24 9:10 UTC (permalink / raw)
To: intel-gfx
In order to close a race with a long running hangcheck comparing a stale
interrupt counter with a just started waiter, we need to first bump the
counter as we start the fresh wait.
References: https://bugs.freedesktop.org/show_bug.cgi?id=96974
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
---
drivers/gpu/drm/i915/intel_breadcrumbs.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_breadcrumbs.c b/drivers/gpu/drm/i915/intel_breadcrumbs.c
index f0b56e3f4abe..d893ccdd62ac 100644
--- a/drivers/gpu/drm/i915/intel_breadcrumbs.c
+++ b/drivers/gpu/drm/i915/intel_breadcrumbs.c
@@ -51,6 +51,13 @@ static void irq_enable(struct intel_engine_cs *engine)
*/
engine->breadcrumbs.irq_posted = true;
+ /* Make sure the current hangcheck doesn't falsely accuse a just
+ * started irq handler from missing an interrupt (because the
+ * interrupt count still matches the stale value from when
+ * the irq handler was disabled, many hangchecks ago).
+ */
+ engine->breadcrumbs.irq_wakeups++;
+
spin_lock_irq(&engine->i915->irq_lock);
engine->irq_enable(engine);
spin_unlock_irq(&engine->i915->irq_lock);
--
2.8.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* ✓ Ro.CI.BAT: success for series starting with [CI,1/2] drm/i915: Drop racy markup of missed-irqs from idle-worker
2016-07-24 9:10 [CI 1/2] drm/i915: Drop racy markup of missed-irqs from idle-worker Chris Wilson
2016-07-24 9:10 ` [CI 2/2] drm/i915: Update the breadcrumb interrupt counter before enabling Chris Wilson
@ 2016-07-24 9:46 ` Patchwork
1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2016-07-24 9:46 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: series starting with [CI,1/2] drm/i915: Drop racy markup of missed-irqs from idle-worker
URL : https://patchwork.freedesktop.org/series/10220/
State : success
== Summary ==
Series 10220v1 Series without cover letter
http://patchwork.freedesktop.org/api/1.0/series/10220/revisions/1/mbox
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
dmesg-warn -> SKIP (ro-bdw-i7-5557U)
ro-bdw-i5-5250u total:244 pass:219 dwarn:4 dfail:0 fail:8 skip:13
ro-bdw-i7-5557U total:244 pass:220 dwarn:2 dfail:0 fail:8 skip:14
ro-bdw-i7-5600u total:244 pass:204 dwarn:0 dfail:0 fail:8 skip:32
ro-byt-n2820 total:244 pass:197 dwarn:0 dfail:0 fail:9 skip:38
ro-hsw-i3-4010u total:244 pass:212 dwarn:0 dfail:0 fail:8 skip:24
ro-hsw-i7-4770r total:244 pass:212 dwarn:0 dfail:0 fail:8 skip:24
ro-ilk-i7-620lm total:244 pass:172 dwarn:0 dfail:0 fail:9 skip:63
ro-ilk1-i5-650 total:239 pass:172 dwarn:0 dfail:0 fail:9 skip:58
ro-ivb-i7-3770 total:244 pass:202 dwarn:0 dfail:0 fail:8 skip:34
ro-skl3-i5-6260u total:244 pass:224 dwarn:0 dfail:0 fail:8 skip:12
ro-snb-i7-2620M total:244 pass:193 dwarn:0 dfail:0 fail:9 skip:42
ro-bsw-n3050 failed to connect after reboot
Results at /archive/results/CI_IGT_test/RO_Patchwork_1590/
03d2b78 drm-intel-nightly: 2016y-07m-22d-17h-52m-13s UTC integration manifest
24b1a9c drm/i915: Update the breadcrumb interrupt counter before enabling
787ab2c drm/i915: Drop racy markup of missed-irqs from idle-worker
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-07-24 9:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-24 9:10 [CI 1/2] drm/i915: Drop racy markup of missed-irqs from idle-worker Chris Wilson
2016-07-24 9:10 ` [CI 2/2] drm/i915: Update the breadcrumb interrupt counter before enabling Chris Wilson
2016-07-24 9:46 ` ✓ Ro.CI.BAT: success for series starting with [CI,1/2] drm/i915: Drop racy markup of missed-irqs from idle-worker Patchwork
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.