intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Andi Shyti <andi@etezian.org>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 2/5] drm/i915/gt: Restore ce->signal flush before releasing virtual engine
Date: Fri, 8 Jan 2021 17:18:22 +0200	[thread overview]
Message-ID: <X/h3vgxF4DlV5jbN@jack.zhora.eu> (raw)
In-Reply-To: <20210107221724.10036-2-chris@chris-wilson.co.uk>

Hi Chris,

> +void intel_context_remove_breadcrumbs(struct intel_context *ce,
> +				      struct intel_breadcrumbs *b)
> +{
> +	struct i915_request *rq, *rn;
> +	bool release = false;
> +	unsigned long flags;
> +
> +	spin_lock_irqsave(&ce->signal_lock, flags);
> +
> +	if (list_empty(&ce->signals))
> +		goto unlock;

does "list_empty" need to be under lock or you've been lazy?

The rest looks fine,
Andi

> +	list_for_each_entry_safe(rq, rn, &ce->signals, signal_link) {
> +		GEM_BUG_ON(!__i915_request_is_complete(rq));
> +		if (!test_and_clear_bit(I915_FENCE_FLAG_SIGNAL,
> +					&rq->fence.flags))
> +			continue;
> +
> +		list_del_rcu(&rq->signal_link);
> +		irq_signal_request(rq, b);
> +		i915_request_put(rq);
> +	}
> +	release = remove_signaling_context(b, ce);
> +
> +unlock:
> +	spin_unlock_irqrestore(&ce->signal_lock, flags);
> +	if (release)
> +		intel_context_put(ce);
> +
> +	while (atomic_read(&b->signaler_active))
> +		cpu_relax();
> +}
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2021-01-08 15:36 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-07 22:17 [Intel-gfx] [PATCH 1/5] drm/i915/selftests: Skip unstable timing measurements Chris Wilson
2021-01-07 22:17 ` [Intel-gfx] [PATCH 2/5] drm/i915/gt: Restore ce->signal flush before releasing virtual engine Chris Wilson
2021-01-08 15:18   ` Andi Shyti [this message]
2021-01-08 15:24     ` Chris Wilson
2021-01-08 15:54       ` Andi Shyti
2021-01-07 22:17 ` [Intel-gfx] [PATCH 3/5] drm/i915/gt: Only retire on the last breadcrumb if the last request Chris Wilson
2021-01-08 15:55   ` Andi Shyti
2021-01-07 22:17 ` [Intel-gfx] [PATCH 4/5] drm/i915/gt: Only disable preemption on gen8 render engines Chris Wilson
2021-01-08 15:24   ` Andi Shyti
2021-01-07 22:17 ` [Intel-gfx] [PATCH 5/5] drm/i915/gt: Disable arbitration on no-preempt requests Chris Wilson
2021-01-08 15:27   ` Andi Shyti
2021-01-07 23:07 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/5] drm/i915/selftests: Skip unstable timing measurements Patchwork
2021-01-07 23:09 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-01-07 23:38 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2021-01-08  0:16 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/5] drm/i915/selftests: Skip unstable timing measurements (rev2) Patchwork
2021-01-08  0:18 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-01-08  0:45 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-01-08  2:59 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2021-01-08 12:26 ` [Intel-gfx] [PATCH 1/5] drm/i915/selftests: Skip unstable timing measurements Andi Shyti
2021-01-08 13:26   ` Chris Wilson
2021-01-08 13:51     ` Andi Shyti
2021-01-08 13:54       ` Chris Wilson
2021-01-08 15:04         ` Andi Shyti
2021-01-08 13:28 ` [Intel-gfx] [PATCH] " Chris Wilson
2021-01-08 15:14   ` Chris Wilson
2021-01-08 15:25     ` Andi Shyti
2021-01-08 18:14 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with drm/i915/selftests: Skip unstable timing measurements (rev4) Patchwork
2021-01-08 18:16 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-01-08 18:45 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " 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=X/h3vgxF4DlV5jbN@jack.zhora.eu \
    --to=andi@etezian.org \
    --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).