Re: [RFC 00/19] Split netmem from struct page

From: Mina Almasry
Date: Fri May 09 2025 - 10:09:40 EST


On Fri, May 9, 2025 at 4:51 AM Byungchul Park <byungchul@xxxxxx> wrote:
>
> The MM subsystem is trying to reduce struct page to a single pointer.
> The first step towards that is splitting struct page by its individual
> users, as has already been done with folio and slab. This patchset does
> that for netmem which is used for page pools.
>
> Matthew Wilcox tried and stopped the same work, you can see in:
>
> https://lore.kernel.org/linux-mm/20230111042214.907030-1-willy@xxxxxxxxxxxxx/
>
> Mina Almasry already has done a lot fo prerequisite works by luck, he
> said :). I stacked my patches on the top of his work e.i. netmem.
>
> I focused on removing the page pool members in struct page this time,
> not moving the allocation code of page pool from net to mm. It can be
> done later if needed.
>
> There are still a lot of works to do, to remove the dependency on struct
> page in the network subsystem. I will continue to work on this after
> this base patchset is merged.
>
> This patchset is based on mm tree's mm-unstable branch.
>

This series largely looks good to me, but a couple of things:

- For deep changes like this to the page_pool, I think we need a
before/after run to Jesper's currently out-of-tree benchmark to see
any regressions:
https://lore.kernel.org/netdev/20250309084118.3080950-1-almasrymina@xxxxxxxxxx/

- Also please CC Pavel on iterations related to netmem/net_iov, they
are reusing that in io_uring code for iouring rx rc as well.

--
Thanks,
Mina