mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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>
This commit is contained in:
committed by
Jakub Kicinski
parent
01c87d7f48
commit
fd9557c360
@@ -6782,6 +6782,7 @@ static void skb_defer_free_flush(void)
|
||||
free_list = llist_del_all(&sdn->defer_list);
|
||||
|
||||
llist_for_each_entry_safe(skb, next, free_list, ll_node) {
|
||||
prefetch(next);
|
||||
napi_consume_skb(skb, 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user