]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net_sched: sch_fq: move qdisc_bstats_update() to fq_dequeue_skb()
authorEric Dumazet <edumazet@google.com>
Fri, 21 Nov 2025 08:32:50 +0000 (08:32 +0000)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 25 Nov 2025 15:10:32 +0000 (16:10 +0100)
Group together changes to qdisc fields to reduce chances of false sharing
if another cpu attempts to acquire the qdisc spinlock.

  qdisc_qstats_backlog_dec(sch, skb);
  sch->q.qlen--;
  qdisc_bstats_update(sch, skb);

Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20251121083256.674562-9-edumazet@google.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/sched/sch_fq.c

index fee922da2f99c0c7ac6d86569cf3bbce47898951..0b0ca1aa9251f959e87dd5dc504fbe0f4cbc75eb 100644 (file)
@@ -497,6 +497,7 @@ static void fq_dequeue_skb(struct Qdisc *sch, struct fq_flow *flow,
        skb_mark_not_on_list(skb);
        qdisc_qstats_backlog_dec(sch, skb);
        sch->q.qlen--;
+       qdisc_bstats_update(sch, skb);
 }
 
 static void flow_queue_add(struct fq_flow *flow, struct sk_buff *skb)
@@ -776,7 +777,6 @@ begin:
                f->time_next_packet = now + len;
        }
 out:
-       qdisc_bstats_update(sch, skb);
        return skb;
 }