Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: add prefetch() in skb_defer_free_flush()

skb_defer_free_flush() is becoming more important these days.

Add a prefetch operation to reduce latency a bit on some
platforms like AMD EPYC 7B12.

On more recent cpus, a stall happens when reading skb_shinfo().
Avoiding it will require a more elaborate strategy.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Paolo Abeni <pabeni@redhat.com>
Link: https://patch.msgid.link/20251106085500.2438951-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Eric Dumazet and committed by
Jakub Kicinski
fd9557c3 01c87d7f

+1
+1
net/core/dev.c
··· 6782 6782 free_list = llist_del_all(&sdn->defer_list); 6783 6783 6784 6784 llist_for_each_entry_safe(skb, next, free_list, ll_node) { 6785 + prefetch(next); 6785 6786 napi_consume_skb(skb, 1); 6786 6787 } 6787 6788 }