intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/3] drm/i915: Enable rcu-only context lookups
Date: Thu, 30 Mar 2017 16:32:37 +0300	[thread overview]
Message-ID: <1490880757.3067.13.camel@linux.intel.com> (raw)
In-Reply-To: <20170329182821.26747-3-chris@chris-wilson.co.uk>

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@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@linux.intel.com>

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

  reply	other threads:[~2017-03-30 13:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-29 18:28 [PATCH 1/3] drm/i915: Group all the global context information together Chris Wilson
2017-03-29 18:28 ` [PATCH 2/3] drm/i915: Allows contexts to be unreferenced locklessly Chris Wilson
2017-03-30 12:57   ` Joonas Lahtinen
2017-03-29 18:28 ` [PATCH 3/3] drm/i915: Enable rcu-only context lookups Chris Wilson
2017-03-30 13:32   ` Joonas Lahtinen [this message]
2017-03-30 13:41     ` Chris Wilson
2017-03-30 12:31 ` [PATCH 1/3] drm/i915: Group all the global context information together Joonas Lahtinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1490880757.3067.13.camel@linux.intel.com \
    --to=joonas.lahtinen@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).