Intel-GFX Archive on 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: [Intel-gfx] [PATCH] drm/i915/gem: Perform all asynchronous waits prior to marking payload start
Date: Wed, 07 Oct 2020 13:03:47 +0300	[thread overview]
Message-ID: <87o8lecpz0.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <160206419423.1580.246985501418024675@build.alporthouse.com>

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

> Quoting Mika Kuoppala (2020-10-07 10:40:59)
>> Chris Wilson <chris@chris-wilson.co.uk> writes:
>> 
>> > The initial breadcrumb marks the transition from context wait and setup
>> > into the request payload. We use the marker to determine if the request
>> > is merely waiting to begin, or is inside the payload and hung.
>> > Forgetting to include a breadcrumb before the user payload would mean we
>> > do not reset the guilty user request, and conversely if the initial
>> > breadcrumb is too early we blame the user for a problem elsewhere.
>> 
>> Agreed.
>> 
>> >
>> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>> > ---
>> >  drivers/gpu/drm/i915/gem/i915_gem_client_blt.c | 18 +++++++++---------
>> >  1 file changed, 9 insertions(+), 9 deletions(-)
>> >
>> > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_client_blt.c b/drivers/gpu/drm/i915/gem/i915_gem_client_blt.c
>> > index 272cf3ea68d5..44821d94544f 100644
>> > --- a/drivers/gpu/drm/i915/gem/i915_gem_client_blt.c
>> > +++ b/drivers/gpu/drm/i915/gem/i915_gem_client_blt.c
>> > @@ -202,12 +202,6 @@ static void clear_pages_worker(struct work_struct *work)
>> >       if (unlikely(err))
>> >               goto out_request;
>> >  
>> > -     if (w->ce->engine->emit_init_breadcrumb) {
>> > -             err = w->ce->engine->emit_init_breadcrumb(rq);
>> > -             if (unlikely(err))
>> > -                     goto out_request;
>> > -     }
>> > -
>> >       /*
>> >        * w->dma is already exported via (vma|obj)->resv we need only
>> >        * keep track of the GPU activity within this vma/request, and
>> > @@ -217,9 +211,15 @@ static void clear_pages_worker(struct work_struct *work)
>> >       if (err)
>> >               goto out_request;
>> >  
>> > -     err = w->ce->engine->emit_bb_start(rq,
>> > -                                        batch->node.start, batch->node.size,
>> > -                                        0);
>> 
>> We don't have to do any extra steps to counter
>> 
>> __i915_vma_move_to_active(vma, rq);
>> 
>> in error path?
>
> No. We always submit the request, and the request is always serialised
> with the steps that have been setup before. So if we fail in adding
> another serialisation step, we can safely abort and complete all the
> steps prior to this point (by submitting the empty request), and
> anything that subsequently wants to wait on those resources we have
> already claimed will wait on this request (which in turn waits on the
> previous resource holders and so forth, the lock chain is never broken).

So decision of emitting anything is crossing the rubicon. No matter
if it part of the breadcrumbs. Well makes sense as rollback after
that decision is prolly much harder than just to emit empty.

Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

> -Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-10-07 10:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-07  9:09 [Intel-gfx] [PATCH] drm/i915/gem: Perform all asynchronous waits prior to marking payload start Chris Wilson
2020-10-07  9:40 ` Mika Kuoppala
2020-10-07  9:49   ` Chris Wilson
2020-10-07 10:03     ` Mika Kuoppala [this message]
2020-10-07 11:46 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " 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=87o8lecpz0.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox