Re: [RFC PATCH v2 06/11] page-pool: add device memory support

2023-09-07 Thread David Wei
On 19/08/2023 13:24, Mina Almasry wrote: > On Sat, Aug 19, 2023 at 8:22 AM Jesper Dangaard Brouer > wrote: >> >> >> >> On 19/08/2023 16.08, Willem de Bruijn wrote: >>> On Sat, Aug 19, 2023 at 5:51 AM Jesper Dangaard Brouer >>> wrote: On 10/08/2023 03.57, Mina Almasry wrote:

Re: [RFC PATCH v2 06/11] page-pool: add device memory support

2023-08-22 Thread Mina Almasry
On Tue, Aug 22, 2023 at 5:24 AM Jesper Dangaard Brouer wrote: > > > > On 22/08/2023 08.05, Mina Almasry wrote: > > On Sat, Aug 19, 2023 at 2:51 AM Jesper Dangaard Brouer > > wrote: > >> > >> On 10/08/2023 03.57, Mina Almasry wrote: > >>> Overload the LSB of struct page* to indicate that it's a

Re: [RFC PATCH v2 06/11] page-pool: add device memory support

2023-08-22 Thread Jesper Dangaard Brouer
On 22/08/2023 08.05, Mina Almasry wrote: On Sat, Aug 19, 2023 at 2:51 AM Jesper Dangaard Brouer wrote: On 10/08/2023 03.57, Mina Almasry wrote: Overload the LSB of struct page* to indicate that it's a page_pool_iov. Refactor mm calls on struct page * into helpers, and add page_pool_iov

Re: [RFC PATCH v2 06/11] page-pool: add device memory support

2023-08-22 Thread Mina Almasry
On Sat, Aug 19, 2023 at 2:51 AM Jesper Dangaard Brouer wrote: > > > > On 10/08/2023 03.57, Mina Almasry wrote: > > Overload the LSB of struct page* to indicate that it's a page_pool_iov. > > > > Refactor mm calls on struct page * into helpers, and add page_pool_iov > > handling on those helpers.

Re: [RFC PATCH v2 06/11] page-pool: add device memory support

2023-08-21 Thread Willem de Bruijn
On Mon, Aug 21, 2023 at 5:31 PM Jakub Kicinski wrote: > > On Sat, 19 Aug 2023 12:12:16 -0400 Willem de Bruijn wrote: > > :-) For the record, there is a prior version that added a separate type. > > > > I did not like the churn it brought and asked for this. > > It does end up looking cleaner that

Re: [RFC PATCH v2 06/11] page-pool: add device memory support

2023-08-21 Thread Jakub Kicinski
On Sat, 19 Aug 2023 12:12:16 -0400 Willem de Bruijn wrote: > :-) For the record, there is a prior version that added a separate type. > > I did not like the churn it brought and asked for this. It does end up looking cleaner that I personally expected, FWIW. > > Use of the LSB (or bits

Re: [RFC PATCH v2 06/11] page-pool: add device memory support

2023-08-19 Thread Willem de Bruijn
On Sat, Aug 19, 2023 at 11:49 AM David Ahern wrote: > > On 8/19/23 9:22 AM, Jesper Dangaard Brouer wrote: > > > > I do see the problem of depending on having a struct page, as the > > page_pool_iov isn't related to struct page. Having "page" in the name > > of "page_pool_iov" is also confusing

Re: [RFC PATCH v2 06/11] page-pool: add device memory support

2023-08-19 Thread Willem de Bruijn
On Sat, Aug 19, 2023 at 5:51 AM Jesper Dangaard Brouer wrote: > > > > On 10/08/2023 03.57, Mina Almasry wrote: > > Overload the LSB of struct page* to indicate that it's a page_pool_iov. > > > > Refactor mm calls on struct page * into helpers, and add page_pool_iov > > handling on those helpers.

Re: [RFC PATCH v2 06/11] page-pool: add device memory support

2023-08-19 Thread Willem de Bruijn
> > Any regression in page pool can be avoided in the common case that > > does not use device mem by placing that behind a static_branch. Would > > that address your performance concerns? > > > > No. This will not help. > > The problem is that every where in the page_pool code it is getting >

Re: [RFC PATCH v2 06/11] page-pool: add device memory support

2023-08-19 Thread Mina Almasry
On Sat, Aug 19, 2023 at 1:24 PM Mina Almasry wrote: > > On Sat, Aug 19, 2023 at 8:22 AM Jesper Dangaard Brouer > wrote: > > > > > > > > On 19/08/2023 16.08, Willem de Bruijn wrote: > > > On Sat, Aug 19, 2023 at 5:51 AM Jesper Dangaard Brouer > > > wrote: > > >> > > >> > > >> > > >> On

Re: [RFC PATCH v2 06/11] page-pool: add device memory support

2023-08-19 Thread Mina Almasry
On Sat, Aug 19, 2023 at 8:22 AM Jesper Dangaard Brouer wrote: > > > > On 19/08/2023 16.08, Willem de Bruijn wrote: > > On Sat, Aug 19, 2023 at 5:51 AM Jesper Dangaard Brouer > > wrote: > >> > >> > >> > >> On 10/08/2023 03.57, Mina Almasry wrote: > >>> Overload the LSB of struct page* to indicate

Re: [RFC PATCH v2 06/11] page-pool: add device memory support

2023-08-19 Thread David Ahern
On 8/19/23 9:22 AM, Jesper Dangaard Brouer wrote: > > I do see the problem of depending on having a struct page, as the > page_pool_iov isn't related to struct page.  Having "page" in the name > of "page_pool_iov" is also confusing (hardest problem is CS is naming, > as we all know). > > To

Re: [RFC PATCH v2 06/11] page-pool: add device memory support

2023-08-19 Thread Jesper Dangaard Brouer
On 19/08/2023 16.08, Willem de Bruijn wrote: On Sat, Aug 19, 2023 at 5:51 AM Jesper Dangaard Brouer wrote: On 10/08/2023 03.57, Mina Almasry wrote: Overload the LSB of struct page* to indicate that it's a page_pool_iov. Refactor mm calls on struct page * into helpers, and add

Re: [RFC PATCH v2 06/11] page-pool: add device memory support

2023-08-19 Thread Jesper Dangaard Brouer
On 10/08/2023 03.57, Mina Almasry wrote: Overload the LSB of struct page* to indicate that it's a page_pool_iov. Refactor mm calls on struct page * into helpers, and add page_pool_iov handling on those helpers. Modify callers of these mm APIs with calls to these helpers instead. I don't

[RFC PATCH v2 06/11] page-pool: add device memory support

2023-08-09 Thread Mina Almasry
Overload the LSB of struct page* to indicate that it's a page_pool_iov. Refactor mm calls on struct page * into helpers, and add page_pool_iov handling on those helpers. Modify callers of these mm APIs with calls to these helpers instead. In areas where struct page* is dereferenced, add a check