Re: [RFC PATCH v3 07/12] page-pool: device memory support

2023-11-09 Thread Christian König
Am 09.11.23 um 04:20 schrieb Mina Almasry: [SNIP] But we might be able to do something as folio is doing now, mm subsystem is still seeing 'struct folio/page', but other subsystem like slab is using 'struct slab', and there is still some common fields shared between 'struct folio' and 'struct sl

Re: [RFC PATCH v3 07/12] page-pool: device memory support

2023-11-09 Thread Yunsheng Lin
On 2023/11/9 20:20, Mina Almasry wrote: > On Thu, Nov 9, 2023 at 1:30 AM Yunsheng Lin wrote: >> >> On 2023/11/9 11:20, Mina Almasry wrote: >>> On Wed, Nov 8, 2023 at 2:56 AM Yunsheng Lin wrote: >> >>> >>> Agreed everything above is undoable. >>> But we might be able to do something as folio

Re: [RFC PATCH v3 07/12] page-pool: device memory support

2023-11-09 Thread Mina Almasry
On Thu, Nov 9, 2023 at 1:30 AM Yunsheng Lin wrote: > > On 2023/11/9 11:20, Mina Almasry wrote: > > On Wed, Nov 8, 2023 at 2:56 AM Yunsheng Lin wrote: > > > > > Agreed everything above is undoable. > > > >> But we might be able to do something as folio is doing now, mm subsystem > >> is still seei

Re: [RFC PATCH v3 07/12] page-pool: device memory support

2023-11-09 Thread Yunsheng Lin
On 2023/11/9 11:20, Mina Almasry wrote: > On Wed, Nov 8, 2023 at 2:56 AM Yunsheng Lin wrote: > > Agreed everything above is undoable. > >> But we might be able to do something as folio is doing now, mm subsystem >> is still seeing 'struct folio/page', but other subsystem like slab is using >> '

Re: [RFC PATCH v3 07/12] page-pool: device memory support

2023-11-09 Thread Paolo Abeni
On Sun, 2023-11-05 at 18:44 -0800, 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 inst

Re: [RFC PATCH v3 07/12] page-pool: device memory support

2023-11-08 Thread Mina Almasry
On Wed, Nov 8, 2023 at 2:56 AM Yunsheng Lin wrote: > > On 2023/11/8 5:56, Mina Almasry wrote: > > On Tue, Nov 7, 2023 at 12:00 AM Yunsheng Lin wrote: > >> > >> On 2023/11/6 10:44, Mina Almasry wrote: > >>> Overload the LSB of struct page* to indicate that it's a page_pool_iov. > >>> > >>> Refacto

Re: [RFC PATCH v3 07/12] page-pool: device memory support

2023-11-08 Thread Yunsheng Lin
On 2023/11/8 5:56, Mina Almasry wrote: > On Tue, Nov 7, 2023 at 12:00 AM Yunsheng Lin wrote: >> >> On 2023/11/6 10:44, 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 >>> h

Re: [RFC PATCH v3 07/12] page-pool: device memory support

2023-11-07 Thread Mina Almasry
On Tue, Nov 7, 2023 at 12:00 AM Yunsheng Lin wrote: > > On 2023/11/6 10:44, 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

Re: [RFC PATCH v3 07/12] page-pool: device memory support

2023-11-07 Thread Yunsheng Lin
On 2023/11/6 10:44, 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. > > In ar

[RFC PATCH v3 07/12] page-pool: device memory support

2023-11-05 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 fo