intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 4/7] drm/i915/gt: Track signaled breadcrumbs outside of the breadcrumb spinlock
Date: Fri, 7 Aug 2020 12:56:54 +0100	[thread overview]
Message-ID: <41c64817-3556-373d-d167-9b9fc058abc1@linux.intel.com> (raw)
In-Reply-To: <159680125470.9674.10674412226026393934@build.alporthouse.com>


On 07/08/2020 12:54, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2020-08-07 12:26:41)
>>
>> On 07/08/2020 09:32, Chris Wilson wrote:
>>>    static void signal_irq_work(struct irq_work *work)
>>>    {
>>>        struct intel_breadcrumbs *b = container_of(work, typeof(*b), irq_work);
>>>        const ktime_t timestamp = ktime_get();
>>> +     struct llist_node *signal, *sn;
>>>        struct intel_context *ce, *cn;
>>>        struct list_head *pos, *next;
>>> -     LIST_HEAD(signal);
>>> +
>>> +     signal = NULL;
>>> +     if (unlikely(!llist_empty(&b->signaled_requests)))
>>> +             signal = llist_del_all(&b->signaled_requests);
>>> @@ -242,7 +248,9 @@ static void signal_irq_work(struct irq_work *work)
>>>                         * spinlock as the callback chain may end up adding
>>>                         * more signalers to the same context or engine.
>>>                         */
>>> -                     __signal_request(rq, &signal);
>>> +                     clear_bit(I915_FENCE_FLAG_SIGNAL, &rq->fence.flags);
>>> +                     if (__signal_request(rq))
>>> +                             signal = __llist_add(&rq->signal_node, signal);
>>
>> Presumably here you count on no possible races, allowing for a more
>> optimized, custom, __llist_add. It needs a comment at minimum, or even
>> better just use llist_add.
> 
> It's a purely local singly linked list here. We own the
> request->signal_node as that is locked by the b->irq_lock and the
> clear_bit, and signal is a local variable.

True.. just a comment then please and with that:

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

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

  reply	other threads:[~2020-08-07 11:57 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-07  8:32 [Intel-gfx] [PATCH 1/7] drm/i915/gt: Remove defunct intel_virtual_engine_get_sibling() Chris Wilson
2020-08-07  8:32 ` [Intel-gfx] [PATCH 2/7] drm/i915/gt: Protect context lifetime with RCU Chris Wilson
2020-08-07 10:08   ` Tvrtko Ursulin
2020-08-07 11:14     ` Chris Wilson
2020-08-07 11:31       ` Tvrtko Ursulin
2020-08-07 11:49         ` Chris Wilson
2020-08-07  8:32 ` [Intel-gfx] [PATCH 3/7] drm/i915/gt: Defer enabling the breadcrumb interrupt to after submission Chris Wilson
2020-08-07  8:37   ` Chris Wilson
2020-08-07 11:21   ` Tvrtko Ursulin
2020-08-07  8:32 ` [Intel-gfx] [PATCH 4/7] drm/i915/gt: Track signaled breadcrumbs outside of the breadcrumb spinlock Chris Wilson
2020-08-07 11:26   ` Tvrtko Ursulin
2020-08-07 11:54     ` Chris Wilson
2020-08-07 11:56       ` Tvrtko Ursulin [this message]
2020-08-07  8:32 ` [Intel-gfx] [PATCH 5/7] drm/i915/gt: Don't cancel the interrupt shadow too early Chris Wilson
2020-08-07 11:27   ` Tvrtko Ursulin
2020-08-07  8:32 ` [Intel-gfx] [PATCH 6/7] drm/i915/gt: Split the breadcrumb spinlock between global and contexts Chris Wilson
2020-08-07  8:35   ` Chris Wilson
2020-08-07 11:54   ` Tvrtko Ursulin
2020-08-07 12:27     ` Chris Wilson
2020-08-07  8:32 ` [Intel-gfx] [PATCH 7/7] drm/i915/gt: Free stale request on destroying the virtual engine Chris Wilson
2020-08-07 12:08   ` Tvrtko Ursulin
2020-08-07 12:45     ` Chris Wilson
2020-08-07  9:50 ` [Intel-gfx] [PATCH 1/7] drm/i915/gt: Remove defunct intel_virtual_engine_get_sibling() Tvrtko Ursulin
2020-08-07 11:57 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/7] " Patchwork
2020-08-07 11:58 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2020-08-07 12:19 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-08-07 14:51 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2020-08-07 12:54 [Intel-gfx] [PATCH 1/7] " Chris Wilson
2020-08-07 12:54 ` [Intel-gfx] [PATCH 4/7] drm/i915/gt: Track signaled breadcrumbs outside of the breadcrumb spinlock Chris Wilson

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=41c64817-3556-373d-d167-9b9fc058abc1@linux.intel.com \
    --to=tvrtko.ursulin@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).