[Intel-gfx] [PATCH] drm/i915: Remove function details from device error messages

Chris Wilson chris at chris-wilson.co.uk
Mon Jul 9 20:14:05 UTC 2018


Quoting Rodrigo Vivi (2018-07-09 18:51:02)
> On Mon, Jul 09, 2018 at 02:48:58PM +0100, Chris Wilson wrote:
> > Error messages are intended to be addressed to the user; be clear,
> > succinct, instructive and unambiguous. Adding the function name to
> > that message does not add any information the user requires and in
> > the process makes the message less clear.
> > 
> > E.g.
> > 
> > [  245.539711] i915 0000:00:02.0: [drm:i915_gem_init [i915]] Failed to initialize GPU, declaring it wedged!
> 
> Overall I like the idea...
> 
> The down side is that for us when debugging we would need to always trust grep like
> searches and many debug messages are constructed out of variables what makes it a bit
> hard to find sometimes. Ok, nothing that we couldn't figure out...

A big difference is that error messages are targeted at the user, and as
such should be succinct and not require them to dig into the source code
to understand what it means and what action they need to take. Usually
such error messages are accompanied by a lot of debug output for
developers to pour over, but for the average user, imo we just need to
say what broke and no longer works, and how they can file a bug (any
information we need for that bug should be captured automatically and
read for them to attach).

> > becomes
> > 
> > [  245.539711] i915 0000:00:02.0: Failed to initialize GPU, declaring it wedged!
> 
> What about adding an "ERROR:" ?

The KERN_ERR is recorded in the output for the userspace application to
decide how to colourize and highlight when it presents the kmsg records.
-Chris


More information about the Intel-gfx mailing list