Add testing for the newly added prepare API, for both aligned
and non-aligned API, also probe API is also tested along with
prepare API.
CC: Alexander Duyck
Signed-off-by: Yunsheng Lin
---
.../selftests/mm/page_frag/page_frag_test.c | 66 +--
tools/testing/selftests/mm
Use appropriate frag_page API instead of caller accessing
'page_frag_cache' directly.
CC: Alexander Duyck
Signed-off-by: Yunsheng Lin
Reviewed-by: Alexander Duyck
Acked-by: Chuck Lever
---
drivers/vhost/net.c | 2 +-
include/linux/page_fr
1. https://lore.kernel.org/all/20230411160902.4134381-3-dhowe...@redhat.com/
2. https://lore.kernel.org/all/15623dac-9358-4597-b3ee-3694a5956...@gmail.com/
3.
https://lore.kernel.org/all/CAKgT0UdH1yD=LSCXFJ=ym_aia4oomd-2wxyko42bizawmt_...@mail.gmail.com/
CC: David Howells
CC: Alexander Duyck
Signed-
-off-by: Yunsheng Lin
---
tools/testing/selftests/mm/Makefile | 3 +
tools/testing/selftests/mm/page_frag/Makefile | 18 ++
.../selftests/mm/page_frag/page_frag_test.c | 170 +
tools/testing/selftests/mm/run_vmtests.sh | 8 +
tools/testing/selftests/mm
Add testing for the newly added prepare API, for both aligned
and non-aligned API, also probe API is also tested along with
prepare API.
CC: Alexander Duyck
Signed-off-by: Yunsheng Lin
---
.../selftests/mm/page_frag/page_frag_test.c | 66 +--
tools/testing/selftests/mm
Use appropriate frag_page API instead of caller accessing
'page_frag_cache' directly.
CC: Alexander Duyck
Signed-off-by: Yunsheng Lin
Reviewed-by: Alexander Duyck
Acked-by: Chuck Lever
---
drivers/vhost/net.c | 2 +-
include/linux/page_fr
1. https://lore.kernel.org/all/20230411160902.4134381-3-dhowe...@redhat.com/
2. https://lore.kernel.org/all/15623dac-9358-4597-b3ee-3694a5956...@gmail.com/
3.
https://lore.kernel.org/all/CAKgT0UdH1yD=LSCXFJ=ym_aia4oomd-2wxyko42bizawmt_...@mail.gmail.com/
CC: David Howells
CC: Alexander Duyck
Signed-
-off-by: Yunsheng Lin
---
tools/testing/selftests/mm/Makefile | 2 +
tools/testing/selftests/mm/page_frag/Makefile | 18 ++
.../selftests/mm/page_frag/page_frag_test.c | 170 ++
tools/testing/selftests/mm/run_vmtests.sh | 8 +
tools/testing/selftests/mm
Use appropriate frag_page API instead of caller accessing
'page_frag_cache' directly.
CC: Alexander Duyck
Signed-off-by: Yunsheng Lin
Reviewed-by: Alexander Duyck
Acked-by: Chuck Lever
---
drivers/vhost/net.c | 2 +-
include/linux/page_fr
1. https://lore.kernel.org/all/20230411160902.4134381-3-dhowe...@redhat.com/
2. https://lore.kernel.org/all/15623dac-9358-4597-b3ee-3694a5956...@gmail.com/
3.
https://lore.kernel.org/all/CAKgT0UdH1yD=LSCXFJ=ym_aia4oomd-2wxyko42bizawmt_...@mail.gmail.com/
CC: David Howells
CC: Alexander Duyck
Signed-
-off-by: Yunsheng Lin
---
tools/testing/selftests/mm/Makefile | 2 +
tools/testing/selftests/mm/page_frag/Makefile | 18 ++
.../selftests/mm/page_frag/page_frag_test.c | 170 ++
tools/testing/selftests/mm/run_vmtests.sh | 9 +-
4 files changed, 198 insertions
Use appropriate frag_page API instead of caller accessing
'page_frag_cache' directly.
CC: Alexander Duyck
Signed-off-by: Yunsheng Lin
Reviewed-by: Alexander Duyck
Acked-by: Chuck Lever
---
drivers/vhost/net.c | 2 +-
include/linux/page_fr
1. https://lore.kernel.org/all/20230411160902.4134381-3-dhowe...@redhat.com/
2. https://lore.kernel.org/all/15623dac-9358-4597-b3ee-3694a5956...@gmail.com/
3.
https://lore.kernel.org/all/CAKgT0UdH1yD=LSCXFJ=ym_aia4oomd-2wxyko42bizawmt_...@mail.gmail.com/
CC: David Howells
CC: Alexander Duyck
Signed-
-off-by: Yunsheng Lin
---
tools/testing/selftests/mm/Makefile | 2 +
tools/testing/selftests/mm/page_frag/Makefile | 18 ++
.../selftests/mm/page_frag/page_frag_test.c | 170 ++
tools/testing/selftests/mm/run_vmtests.sh | 9 +-
4 files changed, 198 insertions
On 2024/8/21 0:02, Alexander Duyck wrote:
> On Tue, Aug 20, 2024 at 6:07 AM Yunsheng Lin wrote:
>>
>> On 2024/8/19 23:54, Alexander Duyck wrote:
>>
>> ...
>>
>>>>>>
>>>>>> "There are three types of API as proposed in this
On 2024/8/19 23:54, Alexander Duyck wrote:
...
"There are three types of API as proposed in this patchset instead of
two types of API:
1. page_frag_alloc_va() returns [va].
2. page_frag_alloc_pg() returns [page, offset].
3. page_frag_alloc() returns [va] & [page, off
On 2024/8/15 23:00, Alexander Duyck wrote:
> On Wed, Aug 14, 2024 at 8:00 PM Yunsheng Lin wrote:
>>
>> On 2024/8/14 23:49, Alexander H Duyck wrote:
>>> On Thu, 2024-08-08 at 20:37 +0800, Yunsheng Lin wrote:
>>>> Currently the page_frag API is returning 'vi
On 2024/8/14 23:49, Alexander H Duyck wrote:
> On Thu, 2024-08-08 at 20:37 +0800, Yunsheng Lin wrote:
>> Currently the page_frag API is returning 'virtual address'
>> or 'va' when allocing and expecting 'virtual address' or
>> 'va' as
On 2024/8/9 19:08, Muhammad Usama Anjum wrote:
> On 8/8/24 5:37 PM, Yunsheng Lin wrote:
>> The testing is done by ensuring that the fragment allocated
>> from a frag_frag_cache instance is pushed into a ptr_ring
>> instance in a kthread binded to a specified cpu, and a k
Use appropriate frag_page API instead of caller accessing
'page_frag_cache' directly.
CC: Alexander Duyck
Signed-off-by: Yunsheng Lin
Reviewed-by: Alexander Duyck
Acked-by: Chuck Lever
---
drivers/vhost/net.c | 2 +-
include/linux/page_fr
h
va, page or both va and page may call page_frag_alloc_va*,
page_frag_alloc_pg*, or page_frag_alloc* API accordingly.
CC: Alexander Duyck
Signed-off-by: Yunsheng Lin
Reviewed-by: Subbaraya Sundeep
Acked-by: Chuck Lever
Acked-by: Sagi Grimberg
---
drivers/net/ethernet/google/gve/gve_rx.c
1. https://lore.kernel.org/all/20230411160902.4134381-3-dhowe...@redhat.com/
2. https://lore.kernel.org/all/15623dac-9358-4597-b3ee-3694a5956...@gmail.com/
3.
https://lore.kernel.org/all/CAKgT0UdH1yD=LSCXFJ=ym_aia4oomd-2wxyko42bizawmt_...@mail.gmail.com/
CC: David Howells
CC: Alexander Duyck
Signed-off-
-off-by: Yunsheng Lin
---
tools/testing/selftests/mm/Makefile | 2 +
tools/testing/selftests/mm/page_frag/Makefile | 18 ++
.../selftests/mm/page_frag/page_frag_test.c | 170 ++
tools/testing/selftests/mm/run_vmtests.sh | 9 +-
4 files changed, 198 insertions
On 2024/3/26 8:28, Mina Almasry wrote:
> On Tue, Mar 5, 2024 at 11:38 AM Mina Almasry wrote:
>>
>> On Tue, Mar 5, 2024 at 4:54 AM Yunsheng Lin wrote:
>>>
>>> On 2024/3/5 10:01, Mina Almasry wrote:
>>>
>&g
On 2024/3/7 6:10, Mina Almasry wrote:
...
> +static int netdev_restart_rx_queue(struct net_device *dev, int rxq_idx)
> +{
> + void *new_mem;
> + void *old_mem;
> + int err;
> +
> + if (!dev || !dev->netdev_ops)
> + return -EINVAL;
>
On 2024/3/6 5:17, Mina Almasry wrote:
> On Tue, Mar 5, 2024 at 4:55 AM Yunsheng Lin wrote:
>>
>> On 2024/3/5 10:01, Mina Almasry wrote:
>>
>> ...
>>
>>>
>>> The netdev_dmabuf_binding struct is refcounted, and releases its
>>> resource
On 2024/3/6 3:38, Mina Almasry wrote:
> On Tue, Mar 5, 2024 at 4:54 AM Yunsheng Lin wrote:
>>
>> On 2024/3/5 10:01, Mina Almasry wrote:
>>
>> ...
>>
>>>
>>> Perf - page-pool benchmark:
>>> ---
>>&g
On 2024/3/5 10:01, Mina Almasry wrote:
...
>
> The netdev_dmabuf_binding struct is refcounted, and releases its
> resources only when all the refs are released.
>
> Signed-off-by: Willem de Bruijn
> Signed-off-by: Kaiyuan Zhang
> Signed-off-by: Mina Almasry
>
> ---
>
> RFC v6:
> - Validate
On 2024/3/5 10:01, Mina Almasry wrote:
> The check is duplicated in 2 places, factor it out into a common helper.
Reviewed-by: Yunsheng Lin
On 2024/3/5 10:01, Mina Almasry wrote:
...
>
> Perf - page-pool benchmark:
> ---
>
> bench_page_pool_simple.ko tests with and without these changes:
> https://pastebin.com/raw/ncHDwAbn
>
> AFAIK the number that really matters in the perf tests is the
> 'tasklet_page_poo
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
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
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
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
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
teration.
>>
>
> That is just a mistake, sorry. Will remove this increment.
You seems to be combining comments in different thread and replying in
one thread, I am not sure that is a good practice and I almost missed the
reply below as I don't seem to be cc'ed.
&
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.
>&g
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
On 2023/11/9 10:22, Mina Almasry wrote:
> On Tue, Nov 7, 2023 at 7:40 PM Yunsheng Lin wrote:
>>
>> On 2023/11/8 5:59, Mina Almasry wrote:
>>> On Mon, Nov 6, 2023 at 11:46 PM Yunsheng Lin wrote:
>>>>
>>>> On 2023/11/6 10:44, Mina Almasry wrote:
On 2023/11/8 5:19, Mina Almasry wrote:
>>
>>
>
> My personal immediate reaction is that this may just introduce code
> churn without significant benefit. If an unsuspecting caller call
> skb_frag_page() on devmem frag and doesn't correctly handle NULL
> return, it will crash or error out anyway, a
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 s
is device memory.
>>
>
> In my limited experience dma-buf is generally device memory, and
> that's really its use case. CONFIG_UDMABUF is a driver that mocks
> dma-buf with a memfd which I think is used for testing. But I can do
> the rename, it's more clear
On 2023/11/8 5:59, Mina Almasry wrote:
> On Mon, Nov 6, 2023 at 11:46 PM Yunsheng Lin wrote:
>>
>> On 2023/11/6 10:44, Mina Almasry wrote:
>>> +
>>> +void __netdev_devmem_binding_free(struct netdev_dmabuf_binding *binding)
&g
On 2023/11/6 10:44, Mina Almasry wrote:
> Make skb_frag_page() fail in the case where the frag is not backed
> by a page, and fix its relevent callers to handle this case.
>
> Correctly handle skb_frag refcounting in the page_pool_iovs case.
>
> Signed-off-by: Mina Almasry
>
...
> /**
> *
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
On 2023/11/6 10:44, Mina Almasry wrote:
> +
> +void __netdev_devmem_binding_free(struct netdev_dmabuf_binding *binding)
> +{
> + size_t size, avail;
> +
> + gen_pool_for_each_chunk(binding->chunk_pool,
> + netdev_devmem_free_chunk_owner, NULL);
> +
> + size =
On 2023/11/6 10:44, Mina Almasry wrote:
> +
> +void netdev_free_devmem(struct page_pool_iov *ppiov)
> +{
> + struct netdev_dmabuf_binding *binding = page_pool_iov_binding(ppiov);
> +
> + refcount_set(&ppiov->refcount, 1);
> +
> + if (gen_pool_has_addr(binding->chunk_pool,
> +
On 2023/11/6 10:44, Mina Almasry wrote:
>
> diff --git a/include/net/page_pool/types.h b/include/net/page_pool/types.h
> index 6fc5134095ed..d4bea053bb7e 100644
> --- a/include/net/page_pool/types.h
> +++ b/include/net/page_pool/types.h
> @@ -60,6 +60,8 @@ struct page_pool_params {
> int
48 matches
Mail list logo