[Intel-gfx] [PATCH] drm/i915: Add process identifier to requests
Chris Wilson
chris at chris-wilson.co.uk
Thu Feb 12 00:51:20 PST 2015
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.
> + put_pid(request->pid);
> +
> i915_gem_request_unreference(request);
> }
Otherwise,
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list