# Re: \[RFC v4 00/18\] Split netmem from struct page

- From: Mina Almasry \<hidden\>
- Date: 2025-06-05 19:55:44 
- List: netdev
- Page: https://ratatoskr.run/netdev/2025/06/3080873
- Thread: https://ratatoskr.run/linux-mm/2025/06/3078623/t.md

```text
On Tue, Jun 3, 2025 at 8:23 PM Byungchul Park [ref] wrote:
>
> On Wed, Jun 04, 2025 at 11:52:28AM +0900, Byungchul Park 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@infradead.org/
> >
> > Mina Almasry already has done a lot fo prerequisite works by luck.  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.
> >
> > The final patch removing the page pool fields will be submitted once
> > all the converting work of page to netmem are done:
> >
> >    1. converting of libeth_fqe by Tony Nguyen.
> >    2. converting of mlx5 by Tariq Toukan.
> >    3. converting of prueth_swdata (on me).
> >    4. converting of freescale driver (on me).
> >
> > For our discussion, I'm sharing what the final patch looks like the
> > following.
>
> To Willy and Mina,
>
> I believe this version might be the final version.  Please check the
> direction if it's going as you meant so as to go ahead convinced.
>
> As I mentioned above, the final patch should be submitted later once all
> the required works on drivers are done, but you can check what it looks
> like, in the following embedded patch in this cover letter.
>

We need this tested with at least 1 of devmem TCP and io_uring zc to
make sure the net_iov stuff isn't broken (I'll get to that when I have
time).

And we need page_pool benchmark numbers before/after this series,
please run those yourself, if at all possible:
https://lore.kernel.org/netdev/20250525034354.258247-1-almasrymina@google.com/

This series adds a bunch of netmem/page casts. I expect them not to
affect fast-path perf, but making sure would be nice.

-- 
Thanks,
Mina
```
