Re: [PATCH net-next 1/3] net: netmem: add net_iov_area freelist helpers

From
Pavel Begunkov <asml.silence@gmail.com>
Date
2026-09-25 11:12:04
Also in
io-uring, lkml
Reply to
Mina Almasry, 2026-09-24
On 9/24/26 17:46, Mina Almasry wrote:
On Thu, Sep 24, 2026 at 8:41 AM Pavel Begunkov [off-list ref] wrote:
quoted
On 9/24/26 16:02, Mina Almasry wrote:
quoted
On Tue, Sep 22, 2026 at 1:43 PM Stanislav Fomichev [off-list ref] wrote:
quoted
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.
What is 'it'? I'm guessing you don't want the freelist array put in
the net_iov_area at all then? Because even that change will make
replacing the freelist array hard to swap? Or are you objecting to
just letting the netmem functions do the locking
I meant this consolidation / patch. Yes, it adds more friction
but I don't see much benefit. And I can guess why Stan didn't
include locking, zcrx takes it for additional sync and keeps
one lock for all areas.

-- 
Pavel Begunkov
Thread (20 messages) 20 messages, 4 authors, last reply 2026-09-27
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help