All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Ben Widawsky <ben@bwidawsk.net>
Subject: Re: [PATCH 1/7] drm/i915: Mark context switch likely
Date: Fri, 05 Apr 2013 10:09:58 +0300	[thread overview]
Message-ID: <87d2u9qwqh.fsf@intel.com> (raw)
In-Reply-To: <1365118914-15753-2-git-send-email-ben@bwidawsk.net>

On Fri, 05 Apr 2013, Ben Widawsky <ben@bwidawsk.net> wrote:
> Only the very first switch doesn't take the path.
>
> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
> ---
>  drivers/gpu/drm/i915/i915_gem_context.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
> index 94d873a..aa080ea 100644
> --- a/drivers/gpu/drm/i915/i915_gem_context.c
> +++ b/drivers/gpu/drm/i915/i915_gem_context.c
> @@ -390,7 +390,7 @@ static int do_switch(struct i915_hw_context *to)
>  	 * is a bit suboptimal because the retiring can occur simply after the
>  	 * MI_SET_CONTEXT instead of when the next seqno has completed.
>  	 */
> -	if (from_obj != NULL) {
> +	if (likely(from_obj)) {

Looking at the function, is this, uh, likely to make a difference?

Same goes for the unlikely in patches 4/7. (Yes, patch_es_ 4/7 - there's
*two* patches 4/7 in the series! :o)

I'm just generally wary of adding (un)likely annotations. I don't think
it matters that the annotation itself is obviously correct; IMHO the
performance impact should matter.

</bikeshed>

BR,
Jani.


>  		from_obj->base.read_domains = I915_GEM_DOMAIN_INSTRUCTION;
>  		i915_gem_object_move_to_active(from_obj, ring);
>  		/* As long as MI_SET_CONTEXT is serializing, ie. it flushes the
> -- 
> 1.8.2
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2013-04-05  7:09 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-04 23:41 [PATCH 0/7] [RFC] Context reference counting Ben Widawsky
2013-04-04 23:41 ` [PATCH 1/7] drm/i915: Mark context switch likely Ben Widawsky
2013-04-05  7:09   ` Jani Nikula [this message]
2013-04-05 16:44     ` Ben Widawsky
2013-04-05 21:36       ` Daniel Vetter
2013-04-08  6:06       ` Jani Nikula
2013-04-04 23:41 ` [PATCH 2/7] drm/i915: Move context special case to get() Ben Widawsky
2013-04-05 10:41   ` Ville Syrjälä
2013-04-05 16:49     ` Ben Widawsky
2013-04-04 23:41 ` [PATCH 3/7] drm/i915: Make object aware that it backs a context Ben Widawsky
2013-04-04 23:41 ` [PATCH 4/7] drm/i915: A bit better messaging for contexts Ben Widawsky
2013-04-04 23:41 ` [PATCH 4/7] drm/i915: Better context messages Ben Widawsky
2013-04-04 23:41 ` [PATCH 5/7] drm/i915: Track context status Ben Widawsky
2013-04-04 23:41 ` [PATCH 6/7] drm/i915: Store last context instead of the obj Ben Widawsky
2013-04-05  7:51   ` Chris Wilson
2013-04-05 17:28     ` Ben Widawsky
2013-04-04 23:41 ` [PATCH 7/7] drm/i915: Print all contexts in debugfs Ben Widawsky
2013-04-04 23:41 ` [PATCH 0/7] [RFC] Context reference counting Ben Widawsky
2013-04-05  4:52   ` Ben Widawsky

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=87d2u9qwqh.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=ben@bwidawsk.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.