lkml.org 
[lkml]   [2024]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH net-next v8 02/14] net: page_pool: create hooks for custom page providers
On Wed, May 08, 2024 at 06:02:14PM +0100, Pavel Begunkov wrote:
> Well, the example fell flat, but you don't use dmabuf when there are
> no upsides from using it. For instance, when you already have pinned
> pages, you're going to use pages, and there are no other refcounting
> concerns.

Sure.

> Unless there is an advantage of dmabufs over FOLL_LONGTERM
> that I don't know about when used with normal user pages.

The advantages of using a dma-buf over FOLL_LONGTERM are:

a) you pre-dma map, which is a significant performance advantage for
IOMMU-based setups
b) you support any dma-buf exported and not just user memory. This
is primarily important for PCIe P2P, but there might be other
useful exporters as well

> > wish io_uring would have just implemented them from the start instead of
> > the current fixed buffers that are not quite as useful by not
> > pre-mapping DMA and not supporting P2P.
>
> fdget(dmabuf) would be horrible, I assume that's not the suggestion.

I'm not even sure what you mean with that.


\
 
 \ /
  Last update: 2024-05-09 06:50    [W:0.063 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site