All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/5] drm/i915: Only enqueue already completed requests
Date: Tue, 06 Aug 2019 17:25:49 +0300	[thread overview]
Message-ID: <874l2uid5e.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20190806134725.25321-1-chris@chris-wilson.co.uk>

Chris Wilson <chris@chris-wilson.co.uk> writes:

> If we are asked to submit a completed request, just move it onto the
> active-list without modifying it's payload.
>

If the seqno is there then there is no need to write
it yes.

But I am not at all certain that I deduced the 'why'
part correctly so please spell it out.

-Mika


> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/i915_request.c | 14 +++++++++-----
>  1 file changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c
> index 8ac7d14ec8c9..69fc66bd1125 100644
> --- a/drivers/gpu/drm/i915/i915_request.c
> +++ b/drivers/gpu/drm/i915/i915_request.c
> @@ -397,6 +397,9 @@ void __i915_request_submit(struct i915_request *request)
>  	GEM_BUG_ON(!irqs_disabled());
>  	lockdep_assert_held(&engine->active.lock);
>  
> +	if (i915_request_completed(request))
> +		goto xfer;
> +
>  	if (i915_gem_context_is_banned(request->gem_context))
>  		i915_request_skip(request, -EIO);
>  
> @@ -420,7 +423,13 @@ void __i915_request_submit(struct i915_request *request)
>  	    i915_sw_fence_signaled(&request->semaphore))
>  		engine->saturated |= request->sched.semaphores;
>  
> +	engine->emit_fini_breadcrumb(request,
> +				     request->ring->vaddr + request->postfix);
> +
> +	engine->serial++;
> +
>  	/* We may be recursing from the signal callback of another i915 fence */
> +xfer:
>  	spin_lock_nested(&request->lock, SINGLE_DEPTH_NESTING);
>  
>  	list_move_tail(&request->sched.link, &engine->active.requests);
> @@ -437,11 +446,6 @@ void __i915_request_submit(struct i915_request *request)
>  
>  	spin_unlock(&request->lock);
>  
> -	engine->emit_fini_breadcrumb(request,
> -				     request->ring->vaddr + request->postfix);
> -
> -	engine->serial++;
> -
>  	trace_i915_request_execute(request);
>  }
>  
> -- 
> 2.23.0.rc1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2019-08-06 14:26 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-06 13:47 [PATCH 1/5] drm/i915: Only enqueue already completed requests Chris Wilson
2019-08-06 13:47 ` [PATCH 2/5] drm/i915/execlists: Force preemption Chris Wilson
2019-08-06 13:47 ` [PATCH 3/5] drm/i915: Mark up "sentinel" requests Chris Wilson
2019-08-06 14:29   ` Mika Kuoppala
2019-08-06 14:47     ` Chris Wilson
2019-08-06 13:47 ` [PATCH 4/5] drm/i915/execlists: Cancel banned contexts on schedule-out Chris Wilson
2019-08-06 13:47 ` [PATCH 5/5] drm/i915: Cancel non-persistent contexts on close Chris Wilson
2019-08-06 14:11   ` Chris Wilson
2019-08-06 14:26   ` Bloomfield, Jon
2019-08-06 14:41     ` Chris Wilson
2019-08-07 13:22   ` Chris Wilson
2019-08-07 14:04     ` Bloomfield, Jon
2019-08-07 14:14       ` Chris Wilson
2019-08-07 14:33         ` Bloomfield, Jon
2019-08-07 15:08           ` Chris Wilson
2019-08-07 15:29             ` Bloomfield, Jon
2019-08-07 15:38               ` Chris Wilson
2019-08-07 16:51               ` Chris Wilson
2019-08-07 17:12                 ` Bloomfield, Jon
2019-08-09 23:34   ` Chris Wilson
2019-08-12 14:39     ` Bloomfield, Jon
2019-08-12 14:51       ` Chris Wilson
2019-08-06 14:25 ` Mika Kuoppala [this message]
2019-08-06 14:44   ` [PATCH 1/5] drm/i915: Only enqueue already completed requests Chris Wilson
2019-08-06 14:51 ` ✗ Fi.CI.BAT: failure for series starting with [1/5] " Patchwork

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=874l2uid5e.fsf@gaia.fi.intel.com \
    --to=mika.kuoppala@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 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.