> skb->pp_recycle was introduced in commit 6a5bcd84e886 ("page_pool: Allow
> drivers to hint on SKB recycling") when drivers had to explicitly opt in
> to page_pool SKB recycling and to avoid touching struct page on the free
> path. Today every page_pool-backed netmem carries its own identity via
> netmem_is_pp(), making the per-SKB skb->pp_recycle bitfield redundant
> and error-prone when SKBs are cloned, split, segmented, shifted, or
> coalesced across page_pool and non-page_pool buffers. For non-page_pool
> pages, get_page(), put_page(), and skb_free_frag() immediately load the
> same first struct page cache line (compound_head, which shares the cache
> line with pp_magic), so checking netmem_is_pp() does not add an extra
> cache-line load.
>
> Remove skb->pp_recycle and check netmem_is_pp() directly via
> napi_pp_get_page() and napi_pp_put_page() inside netmem_inc_ref(),
> netmem_dec_ref(), and skb_pp_recycle(), dropping the now-redundant
> [ ... ]
> skb_irq_freeable() does not exclude SKBs holding page_pool memory
> before calling __kfree_skb() with hardirqs disabled; TX SKBs carrying
> spliced page_pool fragments are subject to the same path.
>
> Signed-off-by: Mina Almasry <[email protected]>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review ยท
https://sashiko.dev/#/patchset/[email protected]?part=4