]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: increase default NAPI_SKB_CACHE_SIZE to 128
authorJason Xing <kernelxing@tencent.com>
Tue, 18 Nov 2025 07:06:43 +0000 (15:06 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 20 Nov 2025 04:29:24 +0000 (20:29 -0800)
commit3505730d9042a8d26e89288ecab04e5d32794e4a
tree086d2ff78f854246e39baa7557daffd13777ba47
parent7c9dd386020db9c46b7faf5c6fa928df2831b6fb
net: increase default NAPI_SKB_CACHE_SIZE to 128

After commit b61785852ed0 ("net: increase skb_defer_max default to 128")
changed the value sysctl_skb_defer_max to avoid many calls to
kick_defer_list_purge(), the same situation can be applied to
NAPI_SKB_CACHE_SIZE that was proposed in 2016. It's a trade-off between
using pre-allocated memory in skb_cache and saving more a bit heavy
function calls in the softirq context.

With this patch applied, we can have more skbs per-cpu to accelerate the
sending path that needs to acquire new skbs.

Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jason Xing <kernelxing@tencent.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Link: https://patch.msgid.link/20251118070646.61344-2-kerneljasonxing@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/skbuff.c