All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Tvrtko Ursulin <tursulin@ursulin.net>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Convert breadcrumbs spinlock to be irqsafe
Date: Fri, 28 Oct 2016 12:26:09 +0100	[thread overview]
Message-ID: <20161028112609.GH29769@nuc-i3427.alporthouse.com> (raw)
In-Reply-To: <704c8019-5ce5-1867-70e8-d3c5649c8899@ursulin.net>

On Fri, Oct 28, 2016 at 11:49:34AM +0100, Tvrtko Ursulin wrote:
> 
> 
> On 28/10/16 11:42, Chris Wilson wrote:
> >On Fri, Oct 28, 2016 at 11:27:43AM +0100, Tvrtko Ursulin wrote:
> >>
> >>
> >>On 28/10/16 11:10, Chris Wilson wrote:
> >>>On Fri, Oct 28, 2016 at 10:42:22AM +0100, Tvrtko Ursulin wrote:
> >>>>
> >>>>
> >>>>On 27/10/16 17:10, Chris Wilson wrote:
> >>>>>The breadcrumbs are about to be used from within IRQ context sections,
> >>>>>therefore we need to employ the irqsafe spinlock variants.
> >>>>>
> >>>>>(This is split out of the defer global seqno allocation patch due to
> >>>>>realisation that we need a more complete conversion if we want to defer
> >>>>>request submission even further.)
> >>>
> >>>[snip]
> >>>
> >>>>Assuming I got the above right and you agree to change it:
> >>>
> >>>You made me go and reduce them to _bh as appropriate anyway!!!
> >>
> >>Hm, but can't enable signalling be called with irqs disabled when
> >>fences are exported?
> >
> >Yes, but that supercedes the spin_lock_bh, so we can just call
> >spin_lock() in enabling_signaling as we can assert that we will always
> >be called with irqs disabled here (due to spin_lock_irqsafe(fence->lock)
> >in the callpath).
> 
> But as long as the b->lock is taken in the irqs disabled section
> somewhere, other callers like signaller thread, debugfs, etc, cannot
> just take it with _bh.

Lockdep doesn't complain, if we take spin_lock(b->lock) under irq inside our
tasklet (enable_signaling)  so long as we use spin_lock_bh() elsewhere.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-10-28 11:26 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-27 16:10 [PATCH] drm/i915: Convert breadcrumbs spinlock to be irqsafe Chris Wilson
2016-10-27 16:48 ` ✓ Fi.CI.BAT: success for " Patchwork
2016-10-28  9:42 ` [PATCH] " Tvrtko Ursulin
2016-10-28 10:10   ` Chris Wilson
2016-10-28 10:27     ` Tvrtko Ursulin
2016-10-28 10:42       ` Chris Wilson
2016-10-28 10:49         ` Tvrtko Ursulin
2016-10-28 11:26           ` Chris Wilson [this message]
2016-10-28 11:30             ` Chris Wilson
2016-10-28 11:40               ` Chris Wilson
2016-10-28 11:43               ` Tvrtko Ursulin
2016-10-28 11:26           ` [PATCH v2] drm: Add timestamp of last modification to GETCONNECTOR ioctl Chris Wilson
2016-10-28 11:32             ` Chris Wilson
2016-10-28 11:31           ` [PATCH v2] drm/i915: Convert breadcrumbs spinlock to be irqsafe and bhsafe Chris Wilson
2016-10-28 11:41 ` [PATCH] drm/i915: Convert breadcrumbs spinlock to be irqsafe Joonas Lahtinen
2016-10-28 12:13 ` [PATCH v3] " Chris Wilson
2016-10-28 12:16 ` ✗ Fi.CI.BAT: failure for drm/i915: Convert breadcrumbs spinlock to be irqsafe (rev3) Patchwork
2016-10-28 13:15 ` ✗ Fi.CI.BAT: failure for drm/i915: Convert breadcrumbs spinlock to be irqsafe (rev4) 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=20161028112609.GH29769@nuc-i3427.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=tursulin@ursulin.net \
    /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.