[Intel-gfx] [PATCH] drm/i915: Add process identifier to requests
Daniel Vetter
daniel at ffwll.ch
Thu Feb 12 01:35:09 PST 2015
On Thu, Feb 12, 2015 at 08:51:20AM +0000, Chris Wilson wrote:
> On Thu, Feb 12, 2015 at 10:26:02AM +0200, Mika Kuoppala wrote:
> > We use the pid of the process which opened our device when
> > we track which was the culprit of the gpu hang. But as that
> > file descriptor might get inherited, we might blame the
> > wrong process when we record the error state.
> >
> > Track process identifiers in requests to always find
> > the correct offender.
> >
> > v2: Track only user processes (Chris)
> >
> > Cc: Kenneth Graunke <kenneth at whitecape.org>
> > Cc: Chris Wilson <chris at chris-wilson.co.uk>
> > Signed-off-by: Mika Kuoppala <mika.kuoppala at intel.com>
> > ---
> > @@ -2572,6 +2574,9 @@ static void i915_gem_free_request(struct drm_i915_gem_request *request)
> > list_del(&request->list);
> > i915_gem_request_remove_from_client(request);
> >
> > + if (request->pid)
>
> put_pid() does the NULL check itself, might as well take advantage of
> that.
Done while merging.
>
> > + put_pid(request->pid);
> > +
> > i915_gem_request_unreference(request);
> > }
>
> Otherwise,
> Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
Queued for -next, thanks for the patch.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
More information about the Intel-gfx
mailing list