Re: [RFC PATCH 2/4] rust: sync: Add dma_fence abstractions
From: Philipp Stanner
Date: Mon Feb 09 2026 - 03:20:09 EST
On Fri, 2026-02-06 at 11:23 +0100, Danilo Krummrich wrote:
> On Thu Feb 5, 2026 at 9:57 AM CET, Boris Brezillon wrote:
> > On Tue, 3 Feb 2026 09:14:01 +0100
> > Philipp Stanner <phasta@xxxxxxxxxx> wrote:
> > Unfortunately, I don't know how to translate that in rust, but we
> > need a way to check if any path code path does a DmaFence.signal(),
> > go back to the entry point (for a WorkItem, that would be
> > WorkItem::run() for instance), and make it a DmaFenceSignallingPath.
> > Not only that, but we need to know all the deps that make it so
> > this path can be called (if I take the WorkItem example, that would
> > be the path that leads to the WorkItem being scheduled).
>
> I think we need a guard object for this that is not Send, just like for any
> other lock.
>
> Internally, those markers rely on lockdep, i.e. they just acquire and release a
> "fake" lock.
The guard object would be created through fence.begin_signalling(), wouldn't it?
And when it drops you call dma_fence_end_signalling()?
How would that ensure that the driver actually marks the signalling region correctly?
P.