From: Jakub Kicinski Date: Sat, 8 Nov 2025 03:02:42 +0000 (-0800) Subject: Merge branch 'net-use-skb_attempt_defer_free-in-napi_consume_skb' X-Git-Tag: v6.19-rc1~170^2~205 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=86b721bb0b4c44499a29253b9fe26fa9ec5d2d82;p=thirdparty%2Fkernel%2Flinux.git Merge branch 'net-use-skb_attempt_defer_free-in-napi_consume_skb' Eric Dumazet says: ==================== 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(). ==================== Link: https://patch.msgid.link/20251106202935.1776179-1-edumazet@google.com Signed-off-by: Jakub Kicinski --- 86b721bb0b4c44499a29253b9fe26fa9ec5d2d82