From: Dragos Tatulea <dtatulea@nvidia.com>
To: Antonio Quartulli <antonio@mandelbit.com>
Cc: <netdev@vger.kernel.org>, <saeedm@nvidia.com>,
<tariqt@nvidia.com>, <mbloch@nvidia.com>, <leon@kernel.org>,
<cratiu@nvidia.com>, <andrew+netdev@lunn.ch>,
<davem@davemloft.net>, <edumazet@kernel.org>, <kuba@kernel.org>,
<pabeni@redhat.com>, <ast@kernel.org>, <daniel@iogearbox.net>,
<hawk@kernel.org>, <john.fastabend@gmail.com>, <sdf@fomichev.me>,
<linux-rdma@vger.kernel.org>, <bpf@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next v2] net/mlx5e: Prefetch the packet a few strides ahead in the linear MPWQE path
Date: Wed, 25 Nov 2026 23:52:33 +0200 [thread overview]
Message-ID: <20261125215233.3422038-1-dtatulea@nvidia.com> (raw)
In-Reply-To: <674eb8ef-c93f-4926-a760-62df154ed3eb@mandelbit.com>
Hi Antonio,
On Tue, Nov 10, 2026 at 11:40:49 +0100, Antonio Quartulli wrote:
> Hi Dragos,
>
> On 06/11/2026 11:55, Dragos Tatulea wrote:
>> Thanks for your patch! These look indeed like enticing numbers. I'd
>> like to take some time to try this at scale and on other NICs (CX8)
>> and CPUs (Grace) and also check latency.
>
> Thanks! In case it helps, I measured latency on my side in the meantime
> (I don't have access to the monster Grace/CX8 equipment, but it's still
> something :-)).
>
First of all, thanks for your patience. I was on vacation, had to
catch up with stuff and finally it took some time to get to a
GB system.
> Request/response over the bare ports (one transaction in flight, like
> netperf UDP_RR/TCP_RR), same system as in the commit message: one RX
> queue per port with its IRQ on a dedicated CPU, MTU 1500, default
> coalescing (adaptive RX, rx-usecs 8, rx-frames 128), 10s per test,
> prefetch off / v2 / v2 + next-WQE follow-up (see below) interleaved,
> mean of 3 rounds:
>
> p50 (us) p90 (us)
> off v2 +next off v2 +next
> UDP, 64 B 24.60 24.61 24.60 25.37 25.37 25.39
> UDP, 1400 B 25.08 25.08 25.10 25.94 25.96 25.92
> TCP, 64 B 24.65 24.64 24.66 25.48 25.46 25.85 (*)
>
> (*) one round at 26.59, the other two at 25.47 and 25.50
>
> p99 and p99.9 (37-45 us and 67-100 us) varied more between rounds than
> between the variants, and nothing was lost. So no latency cost that I
> could see at low rate.
>
Thanks for checking the latency. I saw similar results. So I think
we are good on that front.
Here goes the rest:
The results are baseline (recent net-next) vs your v2 on AMD and a Grace
Blackwell system. NIC is CX8. Results are medians of multiple runs.
Single queue; IRQ, NAPI and the application all on one core, which
is 100% busy in every test.
AMD EPYC 9825 (Zen 5):
throughput cycles/packet
UDP 64B flood, Mpps 1.35 -> 1.44 +7% 1655 -> 1551 -6%
UDP 512B flood, Mpps 1.32 -> 1.43 +8% 1683 -> 1562 -7%
TCP 1 stream, Gb/s 23.9 -> 28.2 +18% 1125 -> 954 -15%
XDP_DROP read, Mpps 10.2 -> 18.4 +81% 219 -> 121 -45%
XDP_DROP no-touch, 23.3 -> 21.9 -6% 96 -> 102 +6%
XDP_TX, Mpps 5.5 -> 11.4 +106% 402 -> 196 -51%
Grace Blackwell (ARM Neoverse V2, 64K page):
throughput cycles/packet
UDP 64B flood, Mpps 2.35 -> 2.58 +10% 1341 -> 1226 -9%
UDP 512B flood, Mpps 2.47 -> 2.56 +4% 1275 -> 1230 -4%
TCP 1 stream, Gb/s 34.0 -> 39.2 +16% 1120 -> 970 -13%
XDP_DROP read, Mpps 12.6 -> 19.6 +56% 255 -> 161 -37%
XDP_DROP no-touch, 36.0 -> 32.4 -10% 88 -> 97 +11%
XDP_TX, Mpps 11.0 -> 12.5 +14% 287 -> 253 -12%
Results on Grace are a a bit noisier. But we can still get
enough signal from them.
So most results look good just as in your test. Except plain
XDP_DROP which has a regression. Nothing to be surprised about
here.
Multi-queue TCP, one iperf3 stream per queue, again IRQ and iperf3
on the same core:
One TCP stream per queue over multiple queues (same pinning):
queues AMD Gb/s Grace Gb/s
1 24.0 -> 28.4 +18% 33.9 -> 39.2 +16%
2 47.0 -> 56.3 +20% 67.4 -> 78.4 +16%
4 92.5 -> 110.5 +19% 134.9 -> 157.4 +17%
8 172.5 -> 206.5 +20% 263.9 -> 308.2 +17%
12 240.3 -> 265.5 +10% 382.8 -> 402.7 +5%
24 370.7 -> 371.7 +0% 413.1 -> 411.7 -0%
The AMD system has 12 CPUs per L3 domain with L3 cache of 32MB. The
Grace ARM has a L3 cache of 112 MB for the whole 72 CPU socket.
Overall I think these results are quite good. I was expecting to
see some issues at scale but nothing really stands out to be
honest.
I wondered how much each prefetch bings and gathered some data
about that as well on the AMD system:
v2 without without without
page headers shinfo
UDP 64B flood +7% +7% +3% +7%
UDP 512B flood +8% +8% 0% +8%
TCP 1 stream +18% +17% 0% +18%
XDP_DROP read +81% +81% -2% +82%
XDP_DROP no-touch -6% -6% -4% -5%
XDP_TX +106% +106% -1% +108%
It does look like the big bulk of the advantage comes from
the header fetch.
> I'm also testing a small follow-up: v2 doesn't prefetch when the stride
> 4 ahead is in the next WQE, so the first strides of every WQE are never
> prefetched. Following the WQ list to the next WQE (only when
> cur_sz >= 2, so it is posted and its pages are allocated) removes 26-32%
> of the remaining DRAM demand fills on the RX CPU and adds 1.8-3.3%
> throughput, measured with TCP inside an ovpn UDP tunnel (where the RX
> CPU is the bottleneck); its latency is the "+next" column above.
>
> I had planned to send it as a follow-up patch, but I can also fold it in
> a v3, whatever you prefer once you have your results.
>
Do you have some results for this?
Thanks,
Dragos
prev parent reply other threads:[~2026-11-25 21:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 19:52 Antonio Quartulli
2026-11-06 10:55 ` Dragos Tatulea
2026-11-10 10:40 ` Antonio Quartulli
2026-11-25 21:52 ` Dragos Tatulea [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=20261125215233.3422038-1-dtatulea@nvidia.com \
--to=dtatulea@nvidia.com \
--cc=andrew+netdev@lunn.ch \
--cc=antonio@mandelbit.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=cratiu@nvidia.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=hawk@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mbloch@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=sdf@fomichev.me \
--cc=tariqt@nvidia.com \
/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®