net: use skb_attempt_defer_free() in napi_consume_skb()
Status from this message: This series was applied to netdev/net-next.git (main)
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 All 3 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | net: allow skb_release_head_state() to be called multiple timesnet/ | +3 | 2 replies | Applied |
| 2/3 | net: fix napi_consume_skb() with alien skbsnet/ | +5 | 19 replies | Applied |
| 3/3 | net: increase skb_defer_max default to 128Documentation/ net/ | +3 | 11 replies | Applied |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Kuniyuki Iwashima | Toke Høiland-Jørgensen | Jason Xing | Jon Hunter | Aditya Garg | Willem de Bruijn |
|---|---|---|---|---|---|---|
| 1/3 | R-b | R-b | ||||
| 2/3 | R-b R-b | R-b | R-b R-b | T-b | T-b | R-b |
| 3/3 | R-b | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 6 reviewers.
Cover letter [PATCH net-next 0/3] net: use skb_attempt_defer_free() in napi_consume_skb()
There is a lack of NUMA awareness and more generally lack of slab caches affinity on TX completion path.
Modern drivers are using napi_consume_skb(), hoping to cache sk_buff in per-cpu caches so that they can be recycled in RX path.
Only use this if the skb was allocated on the same cpu, otherwise use skb_attempt_defer_free() so that the skb is freed on the original cpu.
This removes contention on SLUB spinlocks and data structures, and this makes sure that recycled sk_buff have correct NUMA locality.
After this series, I get ~50% improvement for an UDP tx workload on an AMD EPYC 9B45 (IDPF 200Gbit NIC with 32 TX queues).
I will later refactor skb_attempt_defer_free()
to no longer have to care of skb_shared() and skb_release_head_state().
Eric Dumazet (3):
net: allow skb_release_head_state() to be called multiple times
net: fix napi_consume_skb() with alien skbs
net: increase skb_defer_max default to 128
Documentation/admin-guide/sysctl/net.rst | 4 ++-- net/core/hotdata.c | 2 +- net/core/skbuff.c | 12 ++++++++---- 3 files changed, 11 insertions(+), 7 deletions(-)
Signature · 1 line
2.51.2.1041.gc1ab5b90ca-goog