Re: [RFC PATCH net-next v6 02/15] net: page_pool: create hooks for custom page providers

From
Christoph Hellwig <hch@infradead.org>
Date
2024-03-18 02:03:02
Also in
bpf, linux-alpha, linux-arch, linux-doc, linux-kselftest, linux-media, linux-mips, linux-trace-kernel, lkml, sparclinux
Reply to
Mina Almasry, 2024-03-05
On Mon, Mar 04, 2024 at 06:01:37PM -0800, Mina Almasry wrote:
From: Jakub Kicinski <kuba@kernel.org>

The page providers which try to reuse the same pages will
need to hold onto the ref, even if page gets released from
the pool - as in releasing the page from the pp just transfers
the "ownership" reference from pp to the provider, and provider
will wait for other references to be gone before feeding this
page back into the pool.
The word hook always rings a giant warning bell for me, and looking into
this series I am concerned indeed.

The only provider provided here is the dma-buf one, and that basically
is the only sensible one for the documented design.  So instead of
adding hooks that random proprietary crap can hook into, why not hard
code the dma buf provide and just use a flag?  That'll also avoid
expensive indirect calls.
Thread (73 messages) 73 messages, 10 authors, last reply 2024-04-08
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help