netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 00/10] net_sched: speedup qdisc dequeue
@ 2025-11-10  9:44 Eric Dumazet
  2025-11-10  9:44 ` [PATCH net-next 01/10] net_sched: make room for (struct qdisc_skb_cb)->pkt_segs Eric Dumazet
                   ` (10 more replies)
  0 siblings, 11 replies; 16+ messages in thread
From: Eric Dumazet @ 2025-11-10  9:44 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski, Paolo Abeni
  Cc: Simon Horman, Jamal Hadi Salim, Cong Wang, Jiri Pirko,
	Toke Høiland-Jørgensen, Kuniyuki Iwashima,
	Willem de Bruijn, netdev, eric.dumazet, Eric Dumazet

Avoid up to two cache line misses in qdisc dequeue() to fetch
skb_shinfo(skb)->gso_segs/gso_size while qdisc spinlock is held.

Idea is to cache gso_segs at enqueue time before spinlock is
acquired, in the first skb cache line, where we already
have qdisc_skb_cb(skb)->pkt_len.

This series gives a 8 % improvement in a TX intensive workload.

(120 Mpps -> 130 Mpps on a Turin host, IDPF with 32 TX queues)

Eric Dumazet (10):
  net_sched: make room for (struct qdisc_skb_cb)->pkt_segs
  net: init shinfo->gso_segs from qdisc_pkt_len_init()
  net_sched: initialize qdisc_skb_cb(skb)->pkt_segs in
    qdisc_pkt_len_init()
  net_sched: use qdisc_skb_cb(skb)->pkt_segs in bstats_update()
  net_sched: cake: use qdisc_pkt_segs()
  net_sched: add Qdisc_read_mostly and Qdisc_write groups
  net_sched: sch_fq: move qdisc_bstats_update() to fq_dequeue_skb()
  net_sched: sch_fq: prefetch one skb ahead in dequeue()
  net: prefech skb->priority in __dev_xmit_skb()
  net: annotate a data-race in __dev_xmit_skb()

 include/net/sch_generic.h | 60 ++++++++++++++++++++++++---------------
 net/core/dev.c            | 23 ++++++++++-----
 net/sched/act_ct.c        |  8 +++---
 net/sched/cls_api.c       |  6 ++--
 net/sched/cls_flower.c    |  2 +-
 net/sched/sch_cake.c      | 13 +++------
 net/sched/sch_dualpi2.c   |  1 +
 net/sched/sch_fq.c        |  9 ++++--
 net/sched/sch_netem.c     |  1 +
 net/sched/sch_qfq.c       |  2 +-
 net/sched/sch_taprio.c    |  1 +
 net/sched/sch_tbf.c       |  1 +
 12 files changed, 76 insertions(+), 51 deletions(-)

-- 
2.51.2.1041.gc1ab5b90ca-goog


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2025-11-10 18:22 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-10  9:44 [PATCH net-next 00/10] net_sched: speedup qdisc dequeue Eric Dumazet
2025-11-10  9:44 ` [PATCH net-next 01/10] net_sched: make room for (struct qdisc_skb_cb)->pkt_segs Eric Dumazet
2025-11-10  9:44 ` [PATCH net-next 02/10] net: init shinfo->gso_segs from qdisc_pkt_len_init() Eric Dumazet
2025-11-10  9:44 ` [PATCH net-next 03/10] net_sched: initialize qdisc_skb_cb(skb)->pkt_segs in qdisc_pkt_len_init() Eric Dumazet
2025-11-10  9:44 ` [PATCH net-next 04/10] net_sched: use qdisc_skb_cb(skb)->pkt_segs in bstats_update() Eric Dumazet
2025-11-10  9:45 ` [PATCH net-next 05/10] net_sched: cake: use qdisc_pkt_segs() Eric Dumazet
2025-11-10  9:45 ` [PATCH net-next 06/10] net_sched: add Qdisc_read_mostly and Qdisc_write groups Eric Dumazet
2025-11-10  9:45 ` [PATCH net-next 07/10] net_sched: sch_fq: move qdisc_bstats_update() to fq_dequeue_skb() Eric Dumazet
2025-11-10  9:45 ` [PATCH net-next 08/10] net_sched: sch_fq: prefetch one skb ahead in dequeue() Eric Dumazet
2025-11-10  9:45 ` [PATCH net-next 09/10] net: prefech skb->priority in __dev_xmit_skb() Eric Dumazet
2025-11-10  9:45 ` [PATCH net-next 10/10] net: annotate a data-race " Eric Dumazet
2025-11-10 16:44 ` [PATCH net-next 00/10] net_sched: speedup qdisc dequeue Jakub Kicinski
2025-11-10 17:15   ` Eric Dumazet
2025-11-10 17:27     ` Jakub Kicinski
2025-11-10 18:05       ` Eric Dumazet
2025-11-10 18:22         ` Eric Dumazet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).