[Intel-gfx] [PATCH] drm/i915: Track the proc which created the context
Chris Wilson
chris at chris-wilson.co.uk
Thu Aug 29 11:33:04 CEST 2013
On Thu, Aug 29, 2013 at 08:36:59AM +0200, Daniel Vetter wrote:
> On Thu, Aug 29, 2013 at 3:31 AM, Ben Widawsky
> <benjamin.widawsky at intel.com> wrote:
> > We've tried more than once in the past to print the guilty process.
> > Prior to Mika's recent work however, we never had a good way to actually
> > assign guilt. With that, this trivial patch should get print the guilty
> > process and pid in dmesg.
> >
> > Until we merge the full PPGTT support (which have per fd contexts), we
> > don't have a good way to name the default context used by X, and other
> > clients not opting in to contexts. As such, they will get "swapper" as
> > their guilty process. Once the full PPGTT support is merged, we should
> > be able to properly track the names.
> >
> > NOTE: The string is limited to 16 characters as defined by the ASCII
> > string kept in the task struct. One could theoretically pull out the
> > full from the command args as done for cmdline in proc, but this is
> > terribly ugly, and a homework assignment for another day.
> >
> > Example courtesy of Eric:
> > [drm:i915_set_reset_status] *ERROR* render ring hung inside bo (0x1b5a000 ctx 1 [ext_framebuffer pid=5762]) at 0x1b5a034
> >
> > Cc: Mika Kuoppala <mika.kuoppala at linux.intel.com>
> > Tested-by: Eric Anholt <eric at anholt.net>
> > Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
>
> This is neat. But while at it I think we should add the same
> information to the error state, too. Care to quickly update your
> patch?
We also have request->file, admittedly only valid for live clients, but
could be used for accurate naming. If we want to keep the info around, I
think we want a refcounted struct i915_comm that could be used
independently of contexts (because we have machines too old for
contexts)...
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list