Skip to content

Commit ef13a77

Browse files
edumazetopsiff
authored andcommitted
net: prefech skb->priority in __dev_xmit_skb()
mainline inclusion from mainline-v6.19-rc1 category: performance Most qdiscs need to read skb->priority at enqueue time(). In commit 100dfa7 ("net: dev_queue_xmit() llist adoption") I added a prefetch(next), lets add another one for the second half of skb. Note that skb->priority and skb->hash share a common cache line, so this patch helps qdiscs needing both fields. Signed-off-by: Eric Dumazet <edumazet@google.com> Link: https://patch.msgid.link/20251121083256.674562-11-edumazet@google.com Signed-off-by: Paolo Abeni <pabeni@redhat.com> (cherry picked from commit b2e9821) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent 222fb71 commit ef13a77

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

net/core/dev.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4260,6 +4260,7 @@ static inline int __dev_xmit_skb(struct sk_buff *skb, struct Qdisc *q,
42604260

42614261
llist_for_each_entry_safe(skb, next, ll_list, ll_node) {
42624262
prefetch(next);
4263+
prefetch(&next->priority);
42634264
skb_mark_not_on_list(skb);
42644265
rc = dev_qdisc_enqueue(skb, q, &to_free, txq);
42654266
count++;

0 commit comments

Comments
 (0)