Re: [net-next v1 09/16] page_pool: device memory support

2023-12-13 Thread Yunsheng Lin
On 2023/12/12 22:28, Mina Almasry wrote: ... >> >> the page_ref_*() API may be avoided using the below patch: >> https://patchwork.kernel.org/project/netdevbpf/patch/20231113130041.58124-7-linyunsh...@huawei.com/ >> > > Even after the patch above, you're still calling page_ref_count() in > the p

Re: [net-next v1 09/16] page_pool: device memory support

2023-12-12 Thread Mina Almasry
On Sun, Dec 10, 2023 at 8:04 PM Mina Almasry wrote: > > On Sun, Dec 10, 2023 at 6:26 PM Mina Almasry wrote: > > > > On Sun, Dec 10, 2023 at 6:04 PM Yunsheng Lin wrote: > > > > > > On 2023/12/9 0:05, Mina Almasry wrote: > > > > On Fri, Dec 8, 2023 at 1:30 AM Yunsheng Lin > > > > wrote: > > > >>

Re: [net-next v1 09/16] page_pool: device memory support

2023-12-12 Thread Mina Almasry
On Tue, Dec 12, 2023 at 3:17 AM Yunsheng Lin wrote: > > On 2023/12/12 2:14, Mina Almasry wrote: > > On Mon, Dec 11, 2023 at 3:51 AM Yunsheng Lin wrote: > >> > >> On 2023/12/11 12:04, Mina Almasry wrote: > >>> On Sun, Dec 10, 2023 at 6:26 PM Mina Almasry > >>> wrote: > > On Sun, Dec 10

Re: [net-next v1 09/16] page_pool: device memory support

2023-12-12 Thread Yunsheng Lin
On 2023/12/12 2:14, Mina Almasry wrote: > On Mon, Dec 11, 2023 at 3:51 AM Yunsheng Lin wrote: >> >> On 2023/12/11 12:04, Mina Almasry wrote: >>> On Sun, Dec 10, 2023 at 6:26 PM Mina Almasry wrote: On Sun, Dec 10, 2023 at 6:04 PM Yunsheng Lin wrote: > > On 2023/12/9 0:05,

Re: [net-next v1 09/16] page_pool: device memory support

2023-12-11 Thread Mina Almasry
On Mon, Dec 11, 2023 at 3:51 AM Yunsheng Lin wrote: > > On 2023/12/11 12:04, Mina Almasry wrote: > > On Sun, Dec 10, 2023 at 6:26 PM Mina Almasry wrote: > >> > >> On Sun, Dec 10, 2023 at 6:04 PM Yunsheng Lin > >> wrote: > >>> > >>> On 2023/12/9 0:05, Mina Almasry wrote: > On Fri, Dec 8, 20

Re: [net-next v1 09/16] page_pool: device memory support

2023-12-11 Thread Yunsheng Lin
On 2023/12/11 12:04, Mina Almasry wrote: > On Sun, Dec 10, 2023 at 6:26 PM Mina Almasry wrote: >> >> On Sun, Dec 10, 2023 at 6:04 PM Yunsheng Lin wrote: >>> >>> On 2023/12/9 0:05, Mina Almasry wrote: On Fri, Dec 8, 2023 at 1:30 AM Yunsheng Lin wrote: > > > As mentioned before, i

Re: [net-next v1 09/16] page_pool: device memory support

2023-12-10 Thread Mina Almasry
On Sun, Dec 10, 2023 at 6:26 PM Mina Almasry wrote: > > On Sun, Dec 10, 2023 at 6:04 PM Yunsheng Lin wrote: > > > > On 2023/12/9 0:05, Mina Almasry wrote: > > > On Fri, Dec 8, 2023 at 1:30 AM Yunsheng Lin > > > wrote: > > >> > > >> > > >> As mentioned before, it seems we need to have the above

Re: [net-next v1 09/16] page_pool: device memory support

2023-12-10 Thread Mina Almasry
On Sun, Dec 10, 2023 at 6:04 PM Yunsheng Lin wrote: > > On 2023/12/9 0:05, Mina Almasry wrote: > > On Fri, Dec 8, 2023 at 1:30 AM Yunsheng Lin wrote: > >> > >> > >> As mentioned before, it seems we need to have the above checking every > >> time we need to do some per-page handling in page_pool c

Re: [net-next v1 09/16] page_pool: device memory support

2023-12-10 Thread Yunsheng Lin
On 2023/12/9 0:05, Mina Almasry wrote: > On Fri, Dec 8, 2023 at 1:30 AM Yunsheng Lin wrote: >> >> >> As mentioned before, it seems we need to have the above checking every >> time we need to do some per-page handling in page_pool core, is there >> a plan in your mind how to remove those kind of ch

Re: [net-next v1 09/16] page_pool: device memory support

2023-12-08 Thread Mina Almasry
On Fri, Dec 8, 2023 at 1:30 AM Yunsheng Lin wrote: > > > As mentioned before, it seems we need to have the above checking every > time we need to do some per-page handling in page_pool core, is there > a plan in your mind how to remove those kind of checking in the future? > I see 2 ways to remov

Re: [net-next v1 09/16] page_pool: device memory support

2023-12-08 Thread Yunsheng Lin
On 2023/12/8 8:52, 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 are

[net-next v1 09/16] page_pool: device memory support

2023-12-07 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