From: Paolo Abeni <pabeni@redhat.com>
To: Marek Mietus <mmietus97@yahoo.com>,
netdev@vger.kernel.org, sd@queasysnail.net, kuba@kernel.org
Cc: Jason@zx2c4.com
Subject: Re: [PATCH net-next v8 00/11] net: tunnel: introduce noref xmit flows for tunnels
Date: Tue, 7 Apr 2026 09:39:36 +0200 [thread overview]
Message-ID: <7c32d1c0-563f-41d4-8698-92ffc7682a4f@redhat.com> (raw)
In-Reply-To: <bbb2b833-a9a9-4558-8d4b-1b041f6706d7@yahoo.com>
On 4/6/26 9:58 AM, Marek Mietus wrote:
> W dniu 17.03.2026 o 12:37, Paolo Abeni pisze:
>> On 3/12/26 4:56 PM, Marek Mietus wrote:
>>> Currently, tunnel xmit flows always take a reference on the dst_entry
>>> for each xmitted packet. These atomic operations are redundant in some
>>> flows.
>>>
>>> This patchset introduces the infrastructure required for converting
>>> the tunnel xmit flows to noref, and converts them where possible.
>>>
>>> These changes improve tunnel performance, since less atomic operations
>>> are used.
>>>
>>> There are already noref optimizations in both ipv4 and ip6.
>>> (See __ip_queue_xmit, inet6_csk_xmit)
>>> This patchset implements similar optimizations in ip and udp tunnels.
>>>
>>> Benchmarks:
>>> I used a vxlan tunnel over a pair of veth peers and measured the average
>>> throughput over multiple samples.
>>>
>>> I ran 100 samples on a clean build, and another 100 on a patched
>>> build. Each sample ran for 120 seconds. These were my results:
>>>
>>> clean: 72.52 gb/sec, stddev = 1.39
>>> patched: 75.39 gb/sec, stddev = 0.94
>>>
>>> TL;DR - This patchset results in a 4% improvement in throughput for
>>> vxlan. It's safe to assume that we might see similar results when testing
>>> other tunnels.
>>
>> Sabrina noted I wrongly replied on an old revision. Reporting my
>> statements here for completeness.
>>
>> IMHO this performance delta is not enough to justify this amount of changes.
>>
>> Additionally, the measured impact of removing the dst_hold/dst_release
>> does not fit with my direct experience on the same matter: it should be
>> below noise level in practice, as dst are per-cpu and and no
>> contention/false sharing is expected in a good setup.
>>
>> I think you are observing larger impact because in the veth test
>> dst_release can happen on a remote CPU. Note that this setup (vxlan over
>> veth) is not very relevant in practice.
>>
>> I'm sorry I'm not applying this series.
>>
>> Side note: if you are interested into improving (UDP) tunnel
>> performances have a look to big TCP support work from Alice Mikityanska:
>>
>> https://lore.kernel.org/netdev/20260226201600.222044-1-alice.kernel@fastmail.im/
>>
>> /P
>>
>>
>
> Hi Paolo,
>
> Could you clarify what would be a more realistic test setup? I'm assuming using physical interfaces would yield more realistic results.
> Also, what performance benefit would be worth this kind of "code churn"? What kind of margins were you looking for?
veth devices hides a significant part of the memory buffer lifecycles,
as there is a single allocation/free for both sender and receiver. Using
reasonably fast/recent H/W NICs would make the figures much more relevant.
Given the amount of changes included in this series, I think that a
performance improvement well above the noise range in a relevant test
case would be needed to justify it. If you really want a figure, I would
say 5%. Note that the main difference WRT your testing is the setup itself.
To be completely open, I don't see how the refcount change could come
near such figure, as in my testing on H/W NICs the total reference
counting cost is usually well below noise level.
/P
prev parent reply other threads:[~2026-04-07 7:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260312155657.25676-1-mmietus97.ref@yahoo.com>
2026-03-12 15:56 ` [PATCH net-next v8 00/11] net: tunnel: introduce noref xmit flows for tunnels Marek Mietus
2026-03-12 15:56 ` [PATCH net-next v8 01/11] net: dst_cache: add noref versions for dst_cache Marek Mietus
2026-03-12 15:56 ` [PATCH net-next v8 02/11] net: tunnel: convert iptunnel_xmit to noref Marek Mietus
2026-03-12 15:56 ` [PATCH net-next v8 03/11] net: tunnel: convert udp_tunnel{6,}_xmit_skb " Marek Mietus
2026-03-12 15:56 ` [PATCH net-next v8 04/11] net: tunnel: return noref dsts in udp_tunnel{,6}_dst_lookup Marek Mietus
2026-03-12 15:56 ` [PATCH net-next v8 05/11] net: ovpn: convert ovpn_udp{4,6}_output to use a noref dst Marek Mietus
2026-03-12 15:56 ` [PATCH net-next v8 06/11] wireguard: socket: convert send{4,6} to use a noref dst when possible Marek Mietus
2026-03-12 15:56 ` [PATCH net-next v8 07/11] net: tunnel: convert ip_md_tunnel_xmit to use noref dsts Marek Mietus
2026-03-12 15:56 ` [PATCH net-next v8 08/11] net: tunnel: convert ip_tunnel_xmit to use a noref dst when possible Marek Mietus
2026-03-12 15:56 ` [PATCH net-next v8 09/11] net: sctp: convert sctp_v{4,6}_xmit " Marek Mietus
2026-03-12 15:56 ` [PATCH net-next v8 10/11] net: sit: convert ipip6_tunnel_xmit to use a noref dst Marek Mietus
2026-03-12 15:56 ` [PATCH net-next v8 11/11] net: tipc: convert tipc_udp_xmit " Marek Mietus
2026-03-17 11:37 ` [PATCH net-next v8 00/11] net: tunnel: introduce noref xmit flows for tunnels Paolo Abeni
2026-04-06 7:58 ` Marek Mietus
2026-04-07 7:39 ` Paolo Abeni [this message]
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=7c32d1c0-563f-41d4-8698-92ffc7682a4f@redhat.com \
--to=pabeni@redhat.com \
--cc=Jason@zx2c4.com \
--cc=kuba@kernel.org \
--cc=mmietus97@yahoo.com \
--cc=netdev@vger.kernel.org \
--cc=sd@queasysnail.net \
/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