mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Philipp Stanner <phasta@mailbox.org>
To: "Christian König" <christian.koenig@amd.com>,
	"Boris Brezillon" <boris.brezillon@collabora.com>
Cc: phasta@kernel.org, Danilo Krummrich <dakr@kernel.org>,
	Sumit Semwal	 <sumit.semwal@linaro.org>,
	Alice Ryhl <aliceryhl@google.com>,
	Daniel Almeida	 <dwlsalmeida@gmail.com>,
	Gary Guo <gary@garyguo.net>,
	Tvrtko Ursulin	 <tvrtko.ursulin@igalia.com>,
	linux-media@vger.kernel.org,  dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] dma-fence: Fix races of fence callbacks versus destructors by locking
Date: Tue, 09 Jun 2026 10:54:05 +0200	[thread overview]
Message-ID: <fa2e15f41ef361dd25170ab89509952d3ec8bce5.camel@mailbox.org> (raw)
In-Reply-To: <850fd675-714e-4e3c-895a-d1dafaeb8219@amd.com>

On Tue, 2026-06-09 at 10:02 +0200, Christian König wrote:
> On 6/8/26 18:16, Boris Brezillon wrote:
> > - calling with the lock held in the new places is not causing a
> >   deadlock
> 
> Yeah, exactly that.
> 
> For example the set_deadline() is intentionally not called with the
> fence lock held because that won't work for some use cases.
> 
> The problem when you call ops with a lock held is always that this
> lock then becomes the outermost look held. In other words when you
> for example want to grab a power management lock to implement the
> deadline feature the framework enforces an order between the two
> locks which isn't desired.

A deadlock can only happen if that power management routine also
attempts to take the fence lock. Or maybe the fence ctx lock.

Why would it want to do that? What does it want to signal? I suppose in
case of a close enough deadline you will do a firmware call to shovel
some more coals into the kettle.

The only GPU driver implementing it seems MSM anyways?


P.

  reply	other threads:[~2026-06-09  8:54 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-08 14:24 Philipp Stanner
2026-06-08 15:01 ` Boris Brezillon
2026-06-08 15:17   ` Philipp Stanner
2026-06-08 15:23     ` Danilo Krummrich
2026-06-08 15:30       ` Boris Brezillon
2026-06-08 15:30       ` Philipp Stanner
2026-06-08 16:16         ` Boris Brezillon
2026-06-09  8:02           ` Christian König
2026-06-09  8:54             ` Philipp Stanner [this message]
2026-06-09  8:43           ` Philipp Stanner
2026-06-09  8:47             ` Christian König
2026-06-09  9:00               ` Philipp Stanner
2026-06-08 15:07 ` Tvrtko Ursulin
2026-06-08 15:15   ` Philipp Stanner
2026-06-08 15:35 ` Christian König
2026-06-08 15:41   ` Philipp Stanner
2026-06-08 17:34     ` Christian König
2026-06-08 17:59       ` Danilo Krummrich
2026-06-08 18:32         ` Christian König
2026-06-08 18:39           ` Danilo Krummrich
2026-06-08 18:47             ` Christian König
2026-06-08 19:25               ` Danilo Krummrich
2026-06-09  8:17                 ` Christian König
2026-06-09  5:52               ` Philipp Stanner
2026-06-09 10:26                 ` Christian König
2026-06-09 10:42                   ` Philipp Stanner
2026-06-09 10:53                     ` Christian König
2026-06-09 11:39                       ` Philipp Stanner
2026-06-09 13:19               ` Philipp Stanner
2026-06-09 13:34                 ` Christian König
2026-06-10 14:25                   ` Philipp Stanner
2026-06-10 15:15                     ` Christian König
2026-06-11  8:35                       ` Philipp Stanner
2026-06-11  9:14                         ` Christian König
2026-06-11  9:50                           ` Philipp Stanner
2026-06-11 11:06                             ` Christian König
2026-06-09 13:36                 ` Tvrtko Ursulin
2026-06-09 13:57                   ` Philipp Stanner
2026-06-09 14:03                     ` Christian König
2026-06-15  8:29           ` Properly synchronize dma_fence->signaled bit (Was: Re: [RFC PATCH] dma-fence: Fix races of fence callbacks versus destructors by locking) Philipp Stanner
2026-06-15  9:57             ` Christian König
2026-06-16 11:25               ` Philipp Stanner
2026-06-17  9:46                 ` Christian König
2026-06-17 10:16                   ` Philipp Stanner
2026-06-17 13:03                     ` Christian König
2026-06-17 13:21                       ` Philipp Stanner
2026-06-17 13:50                   ` Gary Guo

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=fa2e15f41ef361dd25170ab89509952d3ec8bce5.camel@mailbox.org \
    --to=phasta@mailbox.org \
    --cc=aliceryhl@google.com \
    --cc=boris.brezillon@collabora.com \
    --cc=christian.koenig@amd.com \
    --cc=dakr@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=dwlsalmeida@gmail.com \
    --cc=gary@garyguo.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=phasta@kernel.org \
    --cc=sumit.semwal@linaro.org \
    --cc=tvrtko.ursulin@igalia.com \
    /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

all inboxes | Powered by JetHome®