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

2024-05-08 Thread Pavel Begunkov
On 5/8/24 16:51, Christoph Hellwig wrote: On Wed, May 08, 2024 at 12:35:52PM +0100, Pavel Begunkov wrote: all these, because e.g. ttm internally does have a page pool because depending upon allocator, that's indeed beneficial. Other drm drivers have more buffer-based concepts for

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

2024-05-08 Thread Pavel Begunkov
On 5/8/24 16:58, Jason Gunthorpe wrote: On Wed, May 08, 2024 at 04:44:32PM +0100, Pavel Begunkov wrote: like a weird and indirect way to get there. Why can't io_uring just be the entity that does the final free and not mess with the logic allocator? Then the user has to do a syscall (e.g.

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

2024-05-08 Thread Jason Gunthorpe
On Wed, May 08, 2024 at 04:44:32PM +0100, Pavel Begunkov wrote: > > like a weird and indirect way to get there. Why can't io_uring just be > > the entity that does the final free and not mess with the logic > > allocator? > > Then the user has to do a syscall (e.g. via io_uring) to return pages,

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

2024-05-08 Thread Pavel Begunkov
On 5/8/24 15:25, Jason Gunthorpe wrote: On Wed, May 08, 2024 at 12:30:07PM +0100, Pavel Begunkov wrote: I'm not going to pretend to know about page pool details, but dmabuf is the way to get the bulk of pages into a pool within the net stack's allocator and keep that bulk properly refcounted

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

2024-05-08 Thread Daniel Vetter
On Wed, May 08, 2024 at 12:35:52PM +0100, Pavel Begunkov wrote: > On 5/8/24 08:16, Daniel Vetter wrote: > > On Tue, May 07, 2024 at 08:32:47PM -0300, Jason Gunthorpe wrote: > > > On Tue, May 07, 2024 at 08:35:37PM +0100, Pavel Begunkov wrote: > > > > On 5/7/24 18:56, Jason Gunthorpe wrote: > > > >

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

2024-05-08 Thread Jason Gunthorpe
On Wed, May 08, 2024 at 12:30:07PM +0100, Pavel Begunkov wrote: > > I'm not going to pretend to know about page pool details, but dmabuf > > is the way to get the bulk of pages into a pool within the net stack's > > allocator and keep that bulk properly refcounted while.> An object like > >

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

2024-05-08 Thread Pavel Begunkov
On 5/8/24 08:16, Daniel Vetter wrote: On Tue, May 07, 2024 at 08:32:47PM -0300, Jason Gunthorpe wrote: On Tue, May 07, 2024 at 08:35:37PM +0100, Pavel Begunkov wrote: On 5/7/24 18:56, Jason Gunthorpe wrote: On Tue, May 07, 2024 at 06:25:52PM +0100, Pavel Begunkov wrote: On 5/7/24 17:48,

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

2024-05-08 Thread Pavel Begunkov
On 5/8/24 00:32, Jason Gunthorpe wrote: On Tue, May 07, 2024 at 08:35:37PM +0100, Pavel Begunkov wrote: On 5/7/24 18:56, Jason Gunthorpe wrote: On Tue, May 07, 2024 at 06:25:52PM +0100, Pavel Begunkov wrote: On 5/7/24 17:48, Jason Gunthorpe wrote: On Tue, May 07, 2024 at 09:42:05AM -0700,

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

2024-05-08 Thread Daniel Vetter
On Tue, May 07, 2024 at 08:32:47PM -0300, Jason Gunthorpe wrote: > On Tue, May 07, 2024 at 08:35:37PM +0100, Pavel Begunkov wrote: > > On 5/7/24 18:56, Jason Gunthorpe wrote: > > > On Tue, May 07, 2024 at 06:25:52PM +0100, Pavel Begunkov wrote: > > > > On 5/7/24 17:48, Jason Gunthorpe wrote: > > >

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

2024-05-07 Thread Jason Gunthorpe
On Tue, May 07, 2024 at 08:35:37PM +0100, Pavel Begunkov wrote: > On 5/7/24 18:56, Jason Gunthorpe wrote: > > On Tue, May 07, 2024 at 06:25:52PM +0100, Pavel Begunkov wrote: > > > On 5/7/24 17:48, Jason Gunthorpe wrote: > > > > On Tue, May 07, 2024 at 09:42:05AM -0700, Mina Almasry wrote: > > > >

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

2024-05-07 Thread Pavel Begunkov
On 5/7/24 18:56, Jason Gunthorpe wrote: On Tue, May 07, 2024 at 06:25:52PM +0100, Pavel Begunkov wrote: On 5/7/24 17:48, Jason Gunthorpe wrote: On Tue, May 07, 2024 at 09:42:05AM -0700, Mina Almasry wrote: 1. Align with devmem TCP to use udmabuf for your io_uring memory. I think in the past

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

2024-05-07 Thread Jason Gunthorpe
On Tue, May 07, 2024 at 06:25:52PM +0100, Pavel Begunkov wrote: > On 5/7/24 17:48, Jason Gunthorpe wrote: > > On Tue, May 07, 2024 at 09:42:05AM -0700, Mina Almasry wrote: > > > > > 1. Align with devmem TCP to use udmabuf for your io_uring memory. I > > > think in the past you said it's a uapi

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

2024-05-07 Thread Pavel Begunkov
On 5/7/24 18:15, Mina Almasry wrote: On Tue, May 7, 2024 at 9:55 AM Pavel Begunkov wrote: On 5/7/24 17:23, Christoph Hellwig wrote: On Tue, May 07, 2024 at 01:18:57PM -0300, Jason Gunthorpe wrote: On Tue, May 07, 2024 at 05:05:12PM +0100, Pavel Begunkov wrote: even in tree if you give them

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

2024-05-07 Thread Pavel Begunkov
On 5/7/24 17:48, Jason Gunthorpe wrote: On Tue, May 07, 2024 at 09:42:05AM -0700, Mina Almasry wrote: 1. Align with devmem TCP to use udmabuf for your io_uring memory. I think in the past you said it's a uapi you don't link but in the face of this pushback you may want to reconsider. dmabuf

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

2024-05-07 Thread Daniel Vetter
On Tue, May 07, 2024 at 01:48:38PM -0300, Jason Gunthorpe wrote: > On Tue, May 07, 2024 at 09:42:05AM -0700, Mina Almasry wrote: > > > 1. Align with devmem TCP to use udmabuf for your io_uring memory. I > > think in the past you said it's a uapi you don't link but in the face > > of this pushback

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

2024-05-07 Thread Pavel Begunkov
On 5/7/24 17:42, Mina Almasry wrote: On Tue, May 7, 2024 at 9:24 AM Christoph Hellwig wrote: On Tue, May 07, 2024 at 01:18:57PM -0300, Jason Gunthorpe wrote: On Tue, May 07, 2024 at 05:05:12PM +0100, Pavel Begunkov wrote: even in tree if you give them enough rope, and they should not have

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

2024-05-07 Thread Mina Almasry
On Tue, May 7, 2024 at 9:55 AM Pavel Begunkov wrote: > > On 5/7/24 17:23, Christoph Hellwig wrote: > > On Tue, May 07, 2024 at 01:18:57PM -0300, Jason Gunthorpe wrote: > >> On Tue, May 07, 2024 at 05:05:12PM +0100, Pavel Begunkov wrote: > even in tree if you give them enough rope, and they

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

2024-05-07 Thread Pavel Begunkov
On 5/7/24 17:23, Christoph Hellwig wrote: On Tue, May 07, 2024 at 01:18:57PM -0300, Jason Gunthorpe wrote: On Tue, May 07, 2024 at 05:05:12PM +0100, Pavel Begunkov wrote: even in tree if you give them enough rope, and they should not have that rope when the only sensible options are page/folio

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

2024-05-07 Thread Jason Gunthorpe
On Tue, May 07, 2024 at 09:42:05AM -0700, Mina Almasry wrote: > 1. Align with devmem TCP to use udmabuf for your io_uring memory. I > think in the past you said it's a uapi you don't link but in the face > of this pushback you may want to reconsider. dmabuf does not force a uapi, you can acquire

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

2024-05-07 Thread Mina Almasry
On Tue, May 7, 2024 at 9:24 AM Christoph Hellwig wrote: > > On Tue, May 07, 2024 at 01:18:57PM -0300, Jason Gunthorpe wrote: > > On Tue, May 07, 2024 at 05:05:12PM +0100, Pavel Begunkov wrote: > > > > even in tree if you give them enough rope, and they should not have > > > > that rope when the

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

2024-05-07 Thread Jason Gunthorpe
On Tue, May 07, 2024 at 05:05:12PM +0100, Pavel Begunkov wrote: > > even in tree if you give them enough rope, and they should not have > > that rope when the only sensible options are page/folio based kernel > > memory (incuding large/huge folios) and dmabuf. > > I believe there is at least one

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

2024-05-07 Thread Pavel Begunkov
On 5/6/24 13:04, Christoph Hellwig wrote: On Fri, May 03, 2024 at 01:10:44PM -0700, Mina Almasry wrote: Is the concern still that folks may be able to hook proprietary stuff into this like you mentioned before[1]? That is on concern. The other is that people will do stupid stuff We're not

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

2024-05-03 Thread Mina Almasry
Sorry for the late reply. On Wed, May 1, 2024 at 12:55 AM Christoph Hellwig wrote: > > Still NAK to creating aⅺbitrary hooks here. Is the concern still that folks may be able to hook proprietary stuff into this like you mentioned before[1]? I don't see how that can be done as currently

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

2024-04-02 Thread Mina Almasry
From: Jakub Kicinski 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