mbox series

[net-next,v4,0/2] optimise local CPU skb_attempt_defer_free

Message ID cover.1712711977.git.asml.silence@gmail.com (mailing list archive)
Headers show
Series optimise local CPU skb_attempt_defer_free | expand

Message

Pavel Begunkov April 10, 2024, 1:28 a.m. UTC
Optimise the case when an skb comes to skb_attempt_defer_free()
on the same CPU it was allocated on. The patch 1 enables skb caches
and gives frags a chance to hit the page pool's fast path.
CPU bound benchmarking with perfect skb_attempt_defer_free()
gives around 1% of extra throughput.

v4: SKB_DROP_REASON_NOT_SPECIFIED -> SKB_CONSUMED
v3: rebased, no changes otherwise
v2: pass @napi_safe=true by using __napi_kfree_skb()

Pavel Begunkov (2):
  net: cache for same cpu skb_attempt_defer_free
  net: use SKB_CONSUMED in skb_attempt_defer_free()

 net/core/skbuff.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

Comments

patchwork-bot+netdevbpf@kernel.org April 11, 2024, 2:30 a.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 10 Apr 2024 02:28:08 +0100 you wrote:
> Optimise the case when an skb comes to skb_attempt_defer_free()
> on the same CPU it was allocated on. The patch 1 enables skb caches
> and gives frags a chance to hit the page pool's fast path.
> CPU bound benchmarking with perfect skb_attempt_defer_free()
> gives around 1% of extra throughput.
> 
> v4: SKB_DROP_REASON_NOT_SPECIFIED -> SKB_CONSUMED
> v3: rebased, no changes otherwise
> v2: pass @napi_safe=true by using __napi_kfree_skb()
> 
> [...]

Here is the summary with links:
  - [net-next,v4,1/2] net: cache for same cpu skb_attempt_defer_free
    https://git.kernel.org/netdev/net-next/c/7cb31c46b9cc
  - [net-next,v4,2/2] net: use SKB_CONSUMED in skb_attempt_defer_free()
    https://git.kernel.org/netdev/net-next/c/d8415a165c43

You are awesome, thank you!