Thread (71 messages) 71 messages, 13 authors, 2024-06-18

Re: [PATCH net-next v10 02/14] net: page_pool: create hooks for custom page providers

From: Christian König <christian.koenig@amd.com>
Date: 2024-06-11 08:22:08
Also in: bpf, dri-devel, linux-alpha, linux-arch, linux-doc, linux-kselftest, linux-media, linux-mips, lkml, netdev, sparclinux

Am 11.06.24 um 08:25 schrieb Christoph Hellwig:
On Mon, Jun 10, 2024 at 02:38:18PM +0200, Christian König wrote:
quoted
Well there is the fundamental problem that you can't use io_uring to
implement the semantics necessary for a dma_fence.
What is the exact problem there?
It's an intentional design decision that dma_fences can be waited on 
with quite a bunch of locks held. Including the DMA-buf reservation 
lock, mmap lock, anything page fault related, shrinker etc...

When you give userspace control over the signaling of a dma_fence then 
that has the same effect as returning to userspace with those locks held 
- you can basically trivially deadlock the system.

I think nearly a dozen implementations fell into that trap: 
https://www.kernel.org/doc/html/v5.9/driver-api/dma-buf.html#indefinite-dma-fences

It's well understood and documented by now why this approach doesn't 
work. So not much of an issue any more, we just have to reject 
implementations from time to time which try doing the same thing again.

Regards,
Christian.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help