* [PATCH] drm/i915: Include GT/seqno activity in engine/hangcheck debugfs @ 2017-03-02 14:21 Chris Wilson 2017-03-02 15:03 ` [PATCH v2] " Chris Wilson 2017-03-02 17:18 ` ✓ Fi.CI.BAT: success for drm/i915: Include GT/seqno activity in engine/hangcheck debugfs (rev2) Patchwork 0 siblings, 2 replies; 4+ messages in thread From: Chris Wilson @ 2017-03-02 14:21 UTC (permalink / raw) To: intel-gfx Whilst investigating some mysterious failures with hangcheck not running during gem_busy/basic-hang-default, the question is why did we decide to cancel the retire_work (which queues the hangcheck)? That decision is based around GT activity, so include that information in the debug report. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com> --- drivers/gpu/drm/i915/i915_debugfs.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 9b697fd03721..ee4bf6f71cab 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -1341,14 +1341,17 @@ static int i915_hangcheck_info(struct seq_file *m, void *unused) } else seq_printf(m, "Hangcheck inactive\n"); + seq_printf(m, "GT active? %s\n", yesno(dev_priv->gt.awake)); + for_each_engine(engine, dev_priv, id) { struct intel_breadcrumbs *b = &engine->breadcrumbs; struct rb_node *rb; seq_printf(m, "%s:\n", engine->name); - seq_printf(m, "\tseqno = %x [current %x, last %x]\n", + seq_printf(m, "\tseqno = %x [current %x, last %x], inflight %d\n", engine->hangcheck.seqno, seqno[id], - intel_engine_last_submit(engine)); + intel_engine_last_submit(engine), + engine->timeline->inflight_seqnos); seq_printf(m, "\twaiters? %s, fake irq active? %s, stalled? %s\n", yesno(intel_engine_has_waiter(engine)), yesno(test_bit(engine->id, @@ -3240,6 +3243,11 @@ static int i915_engine_info(struct seq_file *m, void *unused) intel_runtime_pm_get(dev_priv); + seq_printf(m, "GT awake? %s\n", + yesno(dev_priv->gt.awake)); + seq_printf(m, "Global active requests: %d\n", + dev_priv->gt.active_requests); + for_each_engine(engine, dev_priv, id) { struct intel_breadcrumbs *b = &engine->breadcrumbs; struct drm_i915_gem_request *rq; @@ -3247,11 +3255,12 @@ static int i915_engine_info(struct seq_file *m, void *unused) u64 addr; seq_printf(m, "%s\n", engine->name); - seq_printf(m, "\tcurrent seqno %x, last %x, hangcheck %x [%d ms]\n", + seq_printf(m, "\tcurrent seqno %x, last %x, hangcheck %x [%d ms], inflight %d\n", intel_engine_get_seqno(engine), intel_engine_last_submit(engine), engine->hangcheck.seqno, - jiffies_to_msecs(jiffies - engine->hangcheck.action_timestamp)); + jiffies_to_msecs(jiffies - engine->hangcheck.action_timestamp), + engine->timeline->inflight_seqnos); rcu_read_lock(); -- 2.11.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2] drm/i915: Include GT/seqno activity in engine/hangcheck debugfs 2017-03-02 14:21 [PATCH] drm/i915: Include GT/seqno activity in engine/hangcheck debugfs Chris Wilson @ 2017-03-02 15:03 ` Chris Wilson 2017-03-02 15:27 ` Mika Kuoppala 2017-03-02 17:18 ` ✓ Fi.CI.BAT: success for drm/i915: Include GT/seqno activity in engine/hangcheck debugfs (rev2) Patchwork 1 sibling, 1 reply; 4+ messages in thread From: Chris Wilson @ 2017-03-02 15:03 UTC (permalink / raw) To: intel-gfx Whilst investigating some mysterious failures with hangcheck not running during gem_busy/basic-hang-default, the question is why did we decide to cancel the retire_work (which queues the hangcheck)? That decision is based around GT activity, so include that information in the debug report. v2: Include the GT awake status in the error state Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com> --- drivers/gpu/drm/i915/i915_debugfs.c | 17 +++++++++++++---- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gpu_error.c | 3 +++ 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 9b697fd03721..ee4bf6f71cab 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -1341,14 +1341,17 @@ static int i915_hangcheck_info(struct seq_file *m, void *unused) } else seq_printf(m, "Hangcheck inactive\n"); + seq_printf(m, "GT active? %s\n", yesno(dev_priv->gt.awake)); + for_each_engine(engine, dev_priv, id) { struct intel_breadcrumbs *b = &engine->breadcrumbs; struct rb_node *rb; seq_printf(m, "%s:\n", engine->name); - seq_printf(m, "\tseqno = %x [current %x, last %x]\n", + seq_printf(m, "\tseqno = %x [current %x, last %x], inflight %d\n", engine->hangcheck.seqno, seqno[id], - intel_engine_last_submit(engine)); + intel_engine_last_submit(engine), + engine->timeline->inflight_seqnos); seq_printf(m, "\twaiters? %s, fake irq active? %s, stalled? %s\n", yesno(intel_engine_has_waiter(engine)), yesno(test_bit(engine->id, @@ -3240,6 +3243,11 @@ static int i915_engine_info(struct seq_file *m, void *unused) intel_runtime_pm_get(dev_priv); + seq_printf(m, "GT awake? %s\n", + yesno(dev_priv->gt.awake)); + seq_printf(m, "Global active requests: %d\n", + dev_priv->gt.active_requests); + for_each_engine(engine, dev_priv, id) { struct intel_breadcrumbs *b = &engine->breadcrumbs; struct drm_i915_gem_request *rq; @@ -3247,11 +3255,12 @@ static int i915_engine_info(struct seq_file *m, void *unused) u64 addr; seq_printf(m, "%s\n", engine->name); - seq_printf(m, "\tcurrent seqno %x, last %x, hangcheck %x [%d ms]\n", + seq_printf(m, "\tcurrent seqno %x, last %x, hangcheck %x [%d ms], inflight %d\n", intel_engine_get_seqno(engine), intel_engine_last_submit(engine), engine->hangcheck.seqno, - jiffies_to_msecs(jiffies - engine->hangcheck.action_timestamp)); + jiffies_to_msecs(jiffies - engine->hangcheck.action_timestamp), + engine->timeline->inflight_seqnos); rcu_read_lock(); diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 7a2f2e4468d6..66f19924828a 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -936,6 +936,7 @@ struct i915_gpu_state { char error_msg[128]; bool simulated; + bool awake; int iommu; u32 reset_count; u32 suspend_count; diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c index 76855e1d8795..b4ae1464e0ab 100644 --- a/drivers/gpu/drm/i915/i915_gpu_error.c +++ b/drivers/gpu/drm/i915/i915_gpu_error.c @@ -632,6 +632,7 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m, CSR_VERSION_MINOR(csr->version)); } + err_printf(m, "GT awake: %s\n", yesno(error->awake)); err_printf(m, "EIR: 0x%08x\n", error->eir); err_printf(m, "IER: 0x%08x\n", error->ier); for (i = 0; i < error->ngtier; i++) @@ -1653,6 +1654,8 @@ static void i915_error_capture_msg(struct drm_i915_private *dev_priv, static void i915_capture_gen_state(struct drm_i915_private *dev_priv, struct i915_gpu_state *error) { + error->awake = dev_priv->gt.awake; + error->iommu = -1; #ifdef CONFIG_INTEL_IOMMU error->iommu = intel_iommu_gfx_mapped; -- 2.11.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] drm/i915: Include GT/seqno activity in engine/hangcheck debugfs 2017-03-02 15:03 ` [PATCH v2] " Chris Wilson @ 2017-03-02 15:27 ` Mika Kuoppala 0 siblings, 0 replies; 4+ messages in thread From: Mika Kuoppala @ 2017-03-02 15:27 UTC (permalink / raw) To: Chris Wilson, intel-gfx Chris Wilson <chris@chris-wilson.co.uk> writes: > Whilst investigating some mysterious failures with hangcheck not running > during gem_busy/basic-hang-default, the question is why did we decide to > cancel the retire_work (which queues the hangcheck)? That decision is > based around GT activity, so include that information in the debug > report. > > v2: Include the GT awake status in the error state > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com> Noticed while testing this that we might not be so interested in the instdone bits if the seqno is moving. But nothing to do with this patch. Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com> > --- > drivers/gpu/drm/i915/i915_debugfs.c | 17 +++++++++++++---- > drivers/gpu/drm/i915/i915_drv.h | 1 + > drivers/gpu/drm/i915/i915_gpu_error.c | 3 +++ > 3 files changed, 17 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c > index 9b697fd03721..ee4bf6f71cab 100644 > --- a/drivers/gpu/drm/i915/i915_debugfs.c > +++ b/drivers/gpu/drm/i915/i915_debugfs.c > @@ -1341,14 +1341,17 @@ static int i915_hangcheck_info(struct seq_file *m, void *unused) > } else > seq_printf(m, "Hangcheck inactive\n"); > > + seq_printf(m, "GT active? %s\n", yesno(dev_priv->gt.awake)); > + > for_each_engine(engine, dev_priv, id) { > struct intel_breadcrumbs *b = &engine->breadcrumbs; > struct rb_node *rb; > > seq_printf(m, "%s:\n", engine->name); > - seq_printf(m, "\tseqno = %x [current %x, last %x]\n", > + seq_printf(m, "\tseqno = %x [current %x, last %x], inflight %d\n", > engine->hangcheck.seqno, seqno[id], > - intel_engine_last_submit(engine)); > + intel_engine_last_submit(engine), > + engine->timeline->inflight_seqnos); > seq_printf(m, "\twaiters? %s, fake irq active? %s, stalled? %s\n", > yesno(intel_engine_has_waiter(engine)), > yesno(test_bit(engine->id, > @@ -3240,6 +3243,11 @@ static int i915_engine_info(struct seq_file *m, void *unused) > > intel_runtime_pm_get(dev_priv); > > + seq_printf(m, "GT awake? %s\n", > + yesno(dev_priv->gt.awake)); > + seq_printf(m, "Global active requests: %d\n", > + dev_priv->gt.active_requests); > + > for_each_engine(engine, dev_priv, id) { > struct intel_breadcrumbs *b = &engine->breadcrumbs; > struct drm_i915_gem_request *rq; > @@ -3247,11 +3255,12 @@ static int i915_engine_info(struct seq_file *m, void *unused) > u64 addr; > > seq_printf(m, "%s\n", engine->name); > - seq_printf(m, "\tcurrent seqno %x, last %x, hangcheck %x [%d ms]\n", > + seq_printf(m, "\tcurrent seqno %x, last %x, hangcheck %x [%d ms], inflight %d\n", > intel_engine_get_seqno(engine), > intel_engine_last_submit(engine), > engine->hangcheck.seqno, > - jiffies_to_msecs(jiffies - engine->hangcheck.action_timestamp)); > + jiffies_to_msecs(jiffies - engine->hangcheck.action_timestamp), > + engine->timeline->inflight_seqnos); > > rcu_read_lock(); > > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h > index 7a2f2e4468d6..66f19924828a 100644 > --- a/drivers/gpu/drm/i915/i915_drv.h > +++ b/drivers/gpu/drm/i915/i915_drv.h > @@ -936,6 +936,7 @@ struct i915_gpu_state { > > char error_msg[128]; > bool simulated; > + bool awake; > int iommu; > u32 reset_count; > u32 suspend_count; > diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c > index 76855e1d8795..b4ae1464e0ab 100644 > --- a/drivers/gpu/drm/i915/i915_gpu_error.c > +++ b/drivers/gpu/drm/i915/i915_gpu_error.c > @@ -632,6 +632,7 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m, > CSR_VERSION_MINOR(csr->version)); > } > > + err_printf(m, "GT awake: %s\n", yesno(error->awake)); > err_printf(m, "EIR: 0x%08x\n", error->eir); > err_printf(m, "IER: 0x%08x\n", error->ier); > for (i = 0; i < error->ngtier; i++) > @@ -1653,6 +1654,8 @@ static void i915_error_capture_msg(struct drm_i915_private *dev_priv, > static void i915_capture_gen_state(struct drm_i915_private *dev_priv, > struct i915_gpu_state *error) > { > + error->awake = dev_priv->gt.awake; > + > error->iommu = -1; > #ifdef CONFIG_INTEL_IOMMU > error->iommu = intel_iommu_gfx_mapped; > -- > 2.11.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 4+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915: Include GT/seqno activity in engine/hangcheck debugfs (rev2) 2017-03-02 14:21 [PATCH] drm/i915: Include GT/seqno activity in engine/hangcheck debugfs Chris Wilson 2017-03-02 15:03 ` [PATCH v2] " Chris Wilson @ 2017-03-02 17:18 ` Patchwork 1 sibling, 0 replies; 4+ messages in thread From: Patchwork @ 2017-03-02 17:18 UTC (permalink / raw) To: Chris Wilson; +Cc: intel-gfx == Series Details == Series: drm/i915: Include GT/seqno activity in engine/hangcheck debugfs (rev2) URL : https://patchwork.freedesktop.org/series/20562/ State : success == Summary == Series 20562v2 drm/i915: Include GT/seqno activity in engine/hangcheck debugfs https://patchwork.freedesktop.org/api/1.0/series/20562/revisions/2/mbox/ Test gem_exec_flush: Subgroup basic-batch-kernel-default-uc: fail -> PASS (fi-snb-2600) fdo#100007 fdo#100007 https://bugs.freedesktop.org/show_bug.cgi?id=100007 fi-bdw-5557u total:278 pass:267 dwarn:0 dfail:0 fail:0 skip:11 fi-bsw-n3050 total:278 pass:239 dwarn:0 dfail:0 fail:0 skip:39 fi-bxt-j4205 total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:19 fi-bxt-t5700 total:278 pass:258 dwarn:0 dfail:0 fail:0 skip:20 fi-byt-j1900 total:278 pass:251 dwarn:0 dfail:0 fail:0 skip:27 fi-byt-n2820 total:278 pass:247 dwarn:0 dfail:0 fail:0 skip:31 fi-hsw-4770 total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 fi-hsw-4770r total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 fi-ilk-650 total:278 pass:228 dwarn:0 dfail:0 fail:0 skip:50 fi-ivb-3520m total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 fi-ivb-3770 total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 fi-kbl-7500u total:278 pass:259 dwarn:1 dfail:0 fail:0 skip:18 fi-skl-6260u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 fi-skl-6700hq total:278 pass:261 dwarn:0 dfail:0 fail:0 skip:17 fi-skl-6770hq total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 fi-snb-2520m total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 fi-snb-2600 total:278 pass:249 dwarn:0 dfail:0 fail:0 skip:29 a5783262a0dd79ed8a7d244352378a3db668c5b2 drm-tip: 2017y-03m-02d-14h-56m-29s UTC integration manifest 0e78d6c drm/i915: Include GT/seqno activity in engine/hangcheck debugfs == Logs == For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4039/ _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-03-02 17:18 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-03-02 14:21 [PATCH] drm/i915: Include GT/seqno activity in engine/hangcheck debugfs Chris Wilson 2017-03-02 15:03 ` [PATCH v2] " Chris Wilson 2017-03-02 15:27 ` Mika Kuoppala 2017-03-02 17:18 ` ✓ Fi.CI.BAT: success for drm/i915: Include GT/seqno activity in engine/hangcheck debugfs (rev2) Patchwork
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox