Re: [PATCH net-next 1/3] net: netmem: add net_iov_area freelist helpers
From: Stanislav Fomichev
Date: Thu Sep 24 2026 - 13:00:46 EST
On 09/24, Pavel Begunkov wrote:
> On 9/24/26 16:02, Mina Almasry wrote:
> > On Tue, Sep 22, 2026 at 1:43 PM Stanislav Fomichev <sdf.kernel@xxxxxxxxx> wrote:
> > >
> > > io_uring zero-copy receive and devmem both maintain a bounded LIFO for
> > > net_iovs in a contiguous area. Store the freelist in struct net_iov_area
> > > and provide common push and pop helpers.
> > >
> > > Leave synchronization to area owners. Keep devmem's area adjacent to its
> >
> > This could be a follow up change, but I think synchronization should
> > be provided by the netmem/niov infra, rather than the area owners. TBH
> > the infra providing an unsynchronized data structure and letting the
> > area owner use it and shoot themselves in the foot feels error prone.
> > For now we could use a comment.
>
> I don't think we want it. The duplication is minor, but I'm not set
> on the per area index array approach, and it'd make changing it
> more difficult.
Do you want me to not touch iou in this patch at all? Or are you talking
about potential future synchronization part?
I don't see how this is making changing it more difficult, the freelist is
now behind push/pop which you can freely change, and both UAPIs benefit
from a faster/better freelist.