[Intel-gfx] [PATCH 3/3] drm/i915: Enable rcu-only context lookups
Joonas Lahtinen
joonas.lahtinen at linux.intel.com
Thu Mar 30 13:32:37 UTC 2017
On ke, 2017-03-29 at 19:28 +0100, Chris Wilson wrote:
> Whilst the contents of the context is still protected by the big
> struct_mutex, this is not much of an improvement. It is just one tiny
> step towards reducing our BKL.
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
<SNIP>
> + /* We opt for unserialised reads here. This may result in tearing
> + * in the extremely unlikely event of a GPU hang on this context
> + * as we are querying them. If we need that extra layer of protection,
> + * we should wrap the hangstats with a seqlock.
> + */
>
> if (capable(CAP_SYS_ADMIN))
> args->reset_count = i915_reset_count(&dev_priv->gpu_error);
> else
> args->reset_count = 0;
>
Kill the extra newline.
> - args->batch_active = ctx->guilty_count;
> - args->batch_pending = ctx->active_count;
> -
> - mutex_unlock(&dev->struct_mutex);
> + args->batch_active = READ_ONCE(ctx->guilty_count);
> + args->batch_pending = READ_ONCE(ctx->active_count);
Reviewed-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
More information about the Intel-gfx
mailing list