Re: [PATCH 3/3] drm/i915: Enable rcu-only context lookups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx>

<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@xxxxxxxxxxxxxxx>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux