Skip to contentSkip to conversation

drm/i915: Reinstate error level message for non-simulated gpu hangs

PATCH In review Daniel Vetter 5 participants 15 messages Sep 30, 2014 – Oct 1, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Reinstate error level message for non-simulated gpu hangs

This seems to have been accidentally lost in

commit be62acb4cce1389a28296852737e3917d9cc5b25

Author: Mika Kuoppala <[email protected]>
Date:   Fri Aug 30 16:19:28 2013 +0300

drm/i915: ban badly behaving contexts

Without this real gpu hangs only log output at info level, which gets filtered away by piglit's testrunner.

Cc Mika Kuoppala <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Kenneth Graunke <[email protected]>

--

Note, totally untested since it's a bit late here ;-) -Daniel

---
 drivers/gpu/drm/i915/i915_drv.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/i915/i915_drv.c +2 -0
index 6948877c881c..1870759a5ed8 100644
@@ -842,6 +842,8 @@ int i915_reset(struct drm_device *dev)
 				 "error for simulated gpu hangs\n");
 			ret = 0;
 		}
+	} else {
+		DRM_ERROR("Reset chip after gpu hang\n");
 	}
 
 	if (ret) {
Signature · 1 line
2.1.1
#1 lore raw
Quoted 10 lines · Daniel Vetter

This seems to have been accidentally lost in

commit be62acb4cce1389a28296852737e3917d9cc5b25

Author: Mika Kuoppala <[email protected]>
Date:   Fri Aug 30 16:19:28 2013 +0300

drm/i915: ban badly behaving contexts

Without this real gpu hangs only log output at info level, which gets filtered away by piglit's testrunner.

A successful GPU hang is not an error. Might be a warn or a notice, but it certainly isn't a driver error.
-Chris

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
#2 lore raw
Quoted 7 lines · Chris Wilson
Quoted 6 lines · Daniel Vetter

This seems to have been accidentally lost in

commit be62acb4cce1389a28296852737e3917d9cc5b25

Author: Mika Kuoppala <[email protected]>
Date:   Fri Aug 30 16:19:28 2013 +0300
Quoted 7 lines
Quoted 4 lines

drm/i915: ban badly behaving contexts

Without this real gpu hangs only log output at info level, which gets filtered away by piglit's testrunner.

A successful GPU hang is not an error. Might be a warn or a notice, but it certainly isn't a driver error.

Well not of the kernel driver, but might very well be a bug in the userspace driver. With this piglit marks tests that hung the gpu as dmesg-fail, without this they might even pass. Ken raised this on irc and I agree that it's a must-have feature for developers that their testsuite can tell them when stuff broke. Provding this some other way is a lot more work and imo should be done in a separate patch, this here is just the minimal fix for this regression.
-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#3 lore raw
Quoted 16 lines · Daniel Vetter
Quoted 7 lines · Chris Wilson
Quoted 6 lines · Daniel Vetter

This seems to have been accidentally lost in

commit be62acb4cce1389a28296852737e3917d9cc5b25

Author: Mika Kuoppala <[email protected]>
Date:   Fri Aug 30 16:19:28 2013 +0300
Quoted 7 lines
Quoted 4 lines

drm/i915: ban badly behaving contexts

Without this real gpu hangs only log output at info level, which gets filtered away by piglit's testrunner.

A successful GPU hang is not an error. Might be a warn or a notice, but it certainly isn't a driver error.

Quoted 7 lines

Well not of the kernel driver, but might very well be a bug in the userspace driver. With this piglit marks tests that hung the gpu as dmesg-fail, without this they might even pass. Ken raised this on irc and I agree that it's a must-have feature for developers that their testsuite can tell them when stuff broke. Provding this some other way is a lot more work and imo should be done in a separate patch, this here is just the minimal fix for this regression.

I strongly disagree that we should be working around self-imposed limitations of the test suite by making users believe their kernel is broken.
-Chris

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
#4 lore raw
Quoted 25 lines · Chris Wilson
Quoted 16 lines · Daniel Vetter
Quoted 7 lines · Chris Wilson
Quoted 6 lines · Daniel Vetter

This seems to have been accidentally lost in

commit be62acb4cce1389a28296852737e3917d9cc5b25

Author: Mika Kuoppala <[email protected]>
Date:   Fri Aug 30 16:19:28 2013 +0300
Quoted 7 lines
Quoted 4 lines

drm/i915: ban badly behaving contexts

Without this real gpu hangs only log output at info level, which gets filtered away by piglit's testrunner.

A successful GPU hang is not an error. Might be a warn or a notice, but it certainly isn't a driver error.

Quoted 7 lines

Well not of the kernel driver, but might very well be a bug in the userspace driver. With this piglit marks tests that hung the gpu as dmesg-fail, without this they might even pass. Ken raised this on irc and I agree that it's a must-have feature for developers that their testsuite can tell them when stuff broke. Provding this some other way is a lot more work and imo should be done in a separate patch, this here is just the minimal fix for this regression.

Quoted 3 lines

I strongly disagree that we should be working around self-imposed limitations of the test suite by making users believe their kernel is broken.

So what else should piglit do then?
-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#5 lore raw
Quoted 26 lines · Daniel Vetter
Quoted 25 lines · Chris Wilson
Quoted 23 lines · Daniel Vetter
Quoted 7 lines · Chris Wilson
Quoted 6 lines · Daniel Vetter

This seems to have been accidentally lost in

commit be62acb4cce1389a28296852737e3917d9cc5b25

Author: Mika Kuoppala <[email protected]>
Date:   Fri Aug 30 16:19:28 2013 +0300
Quoted 7 lines
Quoted 4 lines

drm/i915: ban badly behaving contexts

Without this real gpu hangs only log output at info level, which gets filtered away by piglit's testrunner.

A successful GPU hang is not an error. Might be a warn or a notice, but it certainly isn't a driver error.

Well not of the kernel driver, but might very well be a bug in the userspace driver. With this piglit marks tests that hung the gpu as dmesg-fail, without this they might even pass. Ken raised this on irc and I agree that it's a must-have feature for developers that their testsuite can tell them when stuff broke. Provding this some other way is a lot more work and imo should be done in a separate patch, this here is just the minimal fix for this regression.

Quoted 6 lines
Quoted 3 lines

I strongly disagree that we should be working around self-imposed limitations of the test suite by making users believe their kernel is broken.

So what else should piglit do then?
-Daniel

Your GPU hanging is clearly more severe than "info" - it may impact your system stability, and likely represents a bug somewhere in the graphics drivers (whether kernel or userspace). I think we all agree on that.

Piglit runs "dmesg --level emerg,alert,crit,err,warn,notice", which covers everything except "info" and "debug". So anything other than info/debug would be just fine.

--Ken

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#6 lore raw
Quoted 31 lines · Kenneth Graunke
Quoted 30 lines · Daniel Vetter
Quoted 28 lines · Chris Wilson
Quoted 16 lines · Daniel Vetter
Quoted 7 lines · Chris Wilson
Quoted 6 lines · Daniel Vetter

This seems to have been accidentally lost in

commit be62acb4cce1389a28296852737e3917d9cc5b25

Author: Mika Kuoppala <[email protected]>
Date:   Fri Aug 30 16:19:28 2013 +0300
Quoted 7 lines
Quoted 4 lines

drm/i915: ban badly behaving contexts

Without this real gpu hangs only log output at info level, which gets filtered away by piglit's testrunner.

A successful GPU hang is not an error. Might be a warn or a notice, but it certainly isn't a driver error.

Quoted 7 lines

Well not of the kernel driver, but might very well be a bug in the userspace driver. With this piglit marks tests that hung the gpu as dmesg-fail, without this they might even pass. Ken raised this on irc and I agree that it's a must-have feature for developers that their testsuite can tell them when stuff broke. Provding this some other way is a lot more work and imo should be done in a separate patch, this here is just the minimal fix for this regression.

I strongly disagree that we should be working around self-imposed limitations of the test suite by making users believe their kernel is broken.

Quoted 6 lines
Quoted 2 lines

So what else should piglit do then?
-Daniel

Your GPU hanging is clearly more severe than "info" - it may impact your system stability, and likely represents a bug somewhere in the graphics drivers (whether kernel or userspace). I think we all agree on that.

Piglit runs "dmesg --level emerg,alert,crit,err,warn,notice", which covers everything except "info" and "debug". So anything other than info/debug would be just fine.

If we are happy with KERN_NOTICE (normal, but significant condition), that is what I would suggest. Actually, we should make the GPU hang detection itself the notice (to aide regular users). But that probably runs into complications with the simulated hangs with igt causing a WARN test failure - but again, I'd rather our interface with the user (and userfacing bug reporting tools) be correct.
-Chris

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
#7 lore raw

PATCH 1/1 drm/i915: Reinstate error level message for non-simulated gpu hangs

In reply to Daniel Vetter

This seems to have been accidentally lost in

commit be62acb4cce1389a28296852737e3917d9cc5b25

Author: Mika Kuoppala <[email protected]>
Date:   Fri Aug 30 16:19:28 2013 +0300

drm/i915: ban badly behaving contexts

Without this real gpu hangs only log output at info level, which gets filtered away by piglit's testrunner.

v2: Tune down to notice level. Note that we need to add drm/i915 so that at least the automatic igt dmesg filtering still picks it up.

v3: git add and lack of coffee don't mix well.

Cc Mika Kuoppala <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Kenneth Graunke <[email protected]>
---
 drivers/gpu/drm/i915/i915_drv.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/i915/i915_drv.c +2 -0
index ea93ff151a74..c9703816da28 100644
@@ -842,6 +842,8 @@ int i915_reset(struct drm_device *dev)
 				 "error for simulated gpu hangs\n");
 			ret = 0;
 		}
+	} else {
+		pr_notice("drm/i915: Reset chip after gpu hang\n");
 	}
 
 	if (ret) {
Signature · 1 line
2.1.1
#8 lore raw
Quoted 14 lines · Daniel Vetter

This seems to have been accidentally lost in

commit be62acb4cce1389a28296852737e3917d9cc5b25

Author: Mika Kuoppala <[email protected]>
Date:   Fri Aug 30 16:19:28 2013 +0300

drm/i915: ban badly behaving contexts

Without this real gpu hangs only log output at info level, which gets filtered away by piglit's testrunner.

v2: Tune down to notice level. Note that we need to add drm/i915 so that at least the automatic igt dmesg filtering still picks it up.

Quoted 7 lines

v3: git add and lack of coffee don't mix well.

Cc Mika Kuoppala <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Kenneth Graunke <[email protected]>

Hmm, in my igt hang tests, I don't use dev_priv->gpu_error.stop_rings as it is itself incompatible with the tests. This now causes those to fail with a WARN.
-Chris

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
#9 lore raw
Quoted 23 lines · Chris Wilson
Quoted 14 lines · Daniel Vetter

This seems to have been accidentally lost in

commit be62acb4cce1389a28296852737e3917d9cc5b25

Author: Mika Kuoppala <[email protected]>
Date:   Fri Aug 30 16:19:28 2013 +0300

drm/i915: ban badly behaving contexts

Without this real gpu hangs only log output at info level, which gets filtered away by piglit's testrunner.

v2: Tune down to notice level. Note that we need to add drm/i915 so that at least the automatic igt dmesg filtering still picks it up.

Quoted 7 lines

v3: git add and lack of coffee don't mix well.

Cc Mika Kuoppala <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Kenneth Graunke <[email protected]>
Quoted 3 lines

Hmm, in my igt hang tests, I don't use dev_priv->gpu_error.stop_rings as it is itself incompatible with the tests. This now causes those to fail with a WARN.

In Mika's reset stats test we've set stop_rings after execbuf so that we could submit fancy stuff like endless loops with batch-chaining while still shutting up the kernel's output for real hangs.

The nice benefit is that looking at stop_rings then gives you an easy way to double-check from the test that it all worked out since it's getting auto-cleared.

In any case we have a fairly great mess here :(
-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#10 lore raw
Quoted 24 lines · Daniel Vetter
Quoted 23 lines · Chris Wilson
Quoted 21 lines · Daniel Vetter

This seems to have been accidentally lost in

commit be62acb4cce1389a28296852737e3917d9cc5b25

Author: Mika Kuoppala <[email protected]>
Date:   Fri Aug 30 16:19:28 2013 +0300

drm/i915: ban badly behaving contexts

Without this real gpu hangs only log output at info level, which gets filtered away by piglit's testrunner.

v2: Tune down to notice level. Note that we need to add drm/i915 so that at least the automatic igt dmesg filtering still picks it up.

v3: git add and lack of coffee don't mix well.

Cc Mika Kuoppala <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Kenneth Graunke <[email protected]>
Quoted 7 lines
Quoted 3 lines

Hmm, in my igt hang tests, I don't use dev_priv->gpu_error.stop_rings as it is itself incompatible with the tests. This now causes those to fail with a WARN.

In Mika's reset stats test we've set stop_rings after execbuf so that we could submit fancy stuff like endless loops with batch-chaining while still shutting up the kernel's output for real hangs.

That doesn't work for me when I try hanging from one context and running normal coherency tests in another...

Quoted 3 lines

The nice benefit is that looking at stop_rings then gives you an easy way to double-check from the test that it all worked out since it's getting auto-cleared.

A single global value when using multiple concurrent rendering contexts is not so nice. Plus the interface is a pita.
-Chris

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
#11 lore raw

PATCH 1/1 drm/i915: Reinstate error level message for non-simulated gpu hangs

In reply to Daniel Vetter

This seems to have been accidentally lost in

commit be62acb4cce1389a28296852737e3917d9cc5b25

Author: Mika Kuoppala <[email protected]>
Date:   Fri Aug 30 16:19:28 2013 +0300

drm/i915: ban badly behaving contexts

Without this real gpu hangs only log output at info level, which gets filtered away by piglit's testrunner.

v2: Tune down to notice level. Note that we need to add drm/i915 so that at least the automatic igt dmesg filtering still picks it up.

v3: git add and lack of coffee don't mix well.

v4: Message is in between hw and sw reset, so switch verb to continuous form.

Cc Mika Kuoppala <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Kenneth Graunke <[email protected]>
---
 drivers/gpu/drm/i915/i915_drv.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/i915/i915_drv.c +2 -0
index ea93ff151a74..a77b6608a271 100644
@@ -842,6 +842,8 @@ int i915_reset(struct drm_device *dev)
 				 "error for simulated gpu hangs\n");
 			ret = 0;
 		}
+	} else {
+		pr_notice("drm/i915: Resetting chip after gpu hang\n");
 	}
 
 	if (ret) {
Signature · 1 line
2.1.1
#12 lore raw

PATCH 1/1 drm/i915: Reinstate error level message for non-simulated gpu hangs

In reply to Daniel Vetter

This seems to have been accidentally lost in

commit be62acb4cce1389a28296852737e3917d9cc5b25

Author: Mika Kuoppala <[email protected]>
Date:   Fri Aug 30 16:19:28 2013 +0300

drm/i915: ban badly behaving contexts

Without this real gpu hangs only log output at info level, which gets filtered away by piglit's testrunner.

v2: Tune down to notice level. Note that we need to add drm/i915 so that at least the automatic igt dmesg filtering still picks it up.

v3: git add and lack of coffee don't mix well.

v4: Message is in between hw and sw reset, so switch verb to continuous form.

v5: Use i915_stop_rings_allow_warn for consistency. For Chris' case of injecting lots of hangs I guess we need to revamp this all anyway when merging. For now this should plug the regression for piglit testing mesa.

Cc Mika Kuoppala <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Kenneth Graunke <[email protected]>
---
 drivers/gpu/drm/i915/i915_drv.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/i915_drv.c +3 -0
index ea93ff151a74..fec4afe526c7 100644
@@ -844,6 +844,9 @@ int i915_reset(struct drm_device *dev)
 		}
 	}
 
+	if (i915_stop_rings_allow_warn(dev_priv))
+		pr_notice("drm/i915: Resetting chip after gpu hang\n");
+
 	if (ret) {
 		DRM_ERROR("Failed to reset chip: %i\n", ret);
 		mutex_unlock(&dev->struct_mutex);
Signature · 1 line
2.1.1
Reviewed-by on v1 1/1
#13 lore raw
Quoted 24 lines · Daniel Vetter

This seems to have been accidentally lost in

commit be62acb4cce1389a28296852737e3917d9cc5b25

Author: Mika Kuoppala <[email protected]>
Date:   Fri Aug 30 16:19:28 2013 +0300

drm/i915: ban badly behaving contexts

Without this real gpu hangs only log output at info level, which gets filtered away by piglit's testrunner.

v2: Tune down to notice level. Note that we need to add drm/i915 so that at least the automatic igt dmesg filtering still picks it up.

v3: git add and lack of coffee don't mix well.

v4: Message is in between hw and sw reset, so switch verb to continuous form.

v5: Use i915_stop_rings_allow_warn for consistency. For Chris' case of injecting lots of hangs I guess we need to revamp this all anyway when merging. For now this should plug the regression for piglit testing mesa.

Quoted 5 lines
Cc Mika Kuoppala <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Kenneth Graunke <[email protected]>

Whilst I am unhappy with stop_rings in principle, I like this compromise.

-Chris

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
#14 lore raw
In reply to Daniel Vetter
Quoted 38 lines · Daniel Vetter

This seems to have been accidentally lost in

commit be62acb4cce1389a28296852737e3917d9cc5b25

Author: Mika Kuoppala <[email protected]>
Date:   Fri Aug 30 16:19:28 2013 +0300

drm/i915: ban badly behaving contexts

Without this real gpu hangs only log output at info level, which gets filtered away by piglit's testrunner.

v2: Tune down to notice level. Note that we need to add drm/i915 so that at least the automatic igt dmesg filtering still picks it up.

v3: git add and lack of coffee don't mix well.

v4: Message is in between hw and sw reset, so switch verb to continuous form.

v5: Use i915_stop_rings_allow_warn for consistency. For Chris' case of injecting lots of hangs I guess we need to revamp this all anyway when merging. For now this should plug the regression for piglit testing mesa.

Cc Mika Kuoppala <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Kenneth Graunke <[email protected]>
---
 drivers/gpu/drm/i915/i915_drv.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/i915_drv.c +0 -0
index ea93ff151a74..fec4afe526c7 100644

drivers/gpu/drm/i915/i915_drv.c int i915_reset(struct drm_device *dev) · line 849

Quoted 6 lines
drivers/gpu/drm/i915/i915_drv.c +3 -0
@@ -844,6 +844,9 @@ int i915_reset(struct drm_device *dev)
 		}
 	}
 
+	if (i915_stop_rings_allow_warn(dev_priv))
+		pr_notice("drm/i915: Resetting chip after gpu hang\n");
+

I would have added also:

"As of now, further functionality or performance testing beyond this point is utterly pointless."

Perhaps in caps.

-Mika

Quoted 10 lines
drivers/gpu/drm/i915/i915_drv.c +0 -0
 	if (ret) {
 		DRM_ERROR("Failed to reset chip: %i\n", ret);
 		mutex_unlock(&dev->struct_mutex);
Signature · 6 lines
2.1.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx