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

Byungchul Park
2025-06-09T07:53:27Z

On Mon, Jun 09, 2025 at 01:22:55PM +0900, Byungchul Park wrote:
> On Thu, Jun 05, 2025 at 12:55:30PM -0700, Mina Almasry wrote:
> > On Tue, Jun 3, 2025 at 8:23 PM Byungchul Park <byungchul@sk.com> 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:
>
> I'm trying but it keeps conflicting on several steps.. Please share a
> better manual.
>
> Byungchul
>
> > https://lore.kernel.org/netdev/20250525034354.258247-1-almasrymina@google.com/

I will try this guide again with some adjusted.. Thanks anyway.

Byungchul

> >
> > 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