From: Pavel Begunkov <asml.silence@gmail.com>
To: Mina Almasry <almasrymina@google.com>
Cc: Stanislav Fomichev <sdf.kernel@gmail.com>,
netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
hawk@kernel.org, ilias.apalodimas@linaro.org, axboe@kernel.dk,
sdf@fomichev.me, bobbyeshleman@meta.com, kaiyuanz@google.com,
linux-kernel@vger.kernel.org, io-uring@vger.kernel.org
Subject: Re: [PATCH net-next 1/3] net: netmem: add net_iov_area freelist helpers
Date: Fri, 25 Sep 2026 12:11:56 +0100 [thread overview]
Message-ID: <b00ad4a2-d317-4d75-95b1-7d2195c069a9@gmail.com> (raw)
In-Reply-To: <CAHS8izOwo2NZGaxtxaMcjDu1APY7ERLjsHN4B_Oucqs4jZafqw@mail.gmail.com>
On 9/24/26 17:46, Mina Almasry wrote:
> On Thu, Sep 24, 2026 at 8:41 AM Pavel Begunkov <asml.silence@gmail.com> wrote:
>>
>> On 9/24/26 16:02, Mina Almasry wrote:
>>> On Tue, Sep 22, 2026 at 1:43 PM Stanislav Fomichev <sdf.kernel@gmail.com> 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.
>>
>
> 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
next prev parent reply other threads:[~2026-09-25 11:12 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 20:43 [PATCH net-next 0/3] net: consolidate net_iov freelist and DMA handling Stanislav Fomichev
2026-09-22 20:43 ` [PATCH net-next 1/3] net: netmem: add net_iov_area freelist helpers Stanislav Fomichev
2026-09-23 23:46 ` netdev-bot+sashiko
2026-09-24 16:28 ` Stanislav Fomichev
2026-09-24 15:02 ` Mina Almasry
2026-09-24 15:41 ` Pavel Begunkov
2026-09-24 16:46 ` Mina Almasry
2026-09-25 11:11 ` Pavel Begunkov [this message]
2026-09-24 16:48 ` Stanislav Fomichev
2026-09-25 11:42 ` Pavel Begunkov
2026-09-24 16:45 ` Stanislav Fomichev
2026-09-22 20:43 ` [PATCH net-next 2/3] net: devmem: use memory provider helpers for net_iovs Stanislav Fomichev
2026-09-23 23:46 ` netdev-bot+sashiko
2026-09-24 16:25 ` Stanislav Fomichev
2026-09-24 15:15 ` Mina Almasry
2026-09-22 20:43 ` [PATCH net-next 3/3] net: devmem: decode DMA addresses for TX Stanislav Fomichev
2026-09-24 19:26 ` Mina Almasry
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b00ad4a2-d317-4d75-95b1-7d2195c069a9@gmail.com \
--to=asml.silence@gmail.com \
--cc=almasrymina@google.com \
--cc=axboe@kernel.dk \
--cc=bobbyeshleman@meta.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=horms@kernel.org \
--cc=ilias.apalodimas@linaro.org \
--cc=io-uring@vger.kernel.org \
--cc=kaiyuanz@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf.kernel@gmail.com \
--cc=sdf@fomichev.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®