Re: [PATCH net-next v2 08/18] page_pool: make page_pool_put_page_bulk() actually handle array of pages
From: Alexander Lobakin
Date: Mon Oct 21 2024 - 10:05:40 EST
From: Maciej Fijalkowski <maciej.fijalkowski@xxxxxxxxx>
Date: Thu, 17 Oct 2024 13:33:40 +0200
> On Tue, Oct 15, 2024 at 04:53:40PM +0200, Alexander Lobakin wrote:
>> Currently, page_pool_put_page_bulk() indeed takes an array of pointers
>> to the data, not pages, despite the name. As one side effect, when
>> you're freeing frags from &skb_shared_info, xdp_return_frame_bulk()
>> converts page pointers to virtual addresses and then
>> page_pool_put_page_bulk() converts them back.
>> Make page_pool_put_page_bulk() actually handle array of pages. Pass
>> frags directly and use virt_to_page() when freeing xdpf->data, so that
>> the PP core will then get the compound head and take care of the rest.
>
> OTOH this one makes sense to me as a part of this patchset, plus i like
> that you are getting rid of virt to page dances.
>
> Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@xxxxxxxxx>
>
> Any small improvements observed when doing micro benchmarks on your side?
I didn't test the perf on this one without patch 9, so dunno =\
BTW this one is needed for #9, while #9 is needed for idpf as idpf can
mix up to 3 page_pools within one frame (1 for the header, 1 for a large
frag, 1 for a small frag).
Thanks,
Olek