From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Eric Dumazet <edumazet@google.com>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: Simon Horman <horms@kernel.org>,
Jamal Hadi Salim <jhs@mojatatu.com>,
Cong Wang <xiyou.wangcong@gmail.com>,
Jiri Pirko <jiri@resnulli.us>,
Kuniyuki Iwashima <kuniyu@google.com>,
Willem de Bruijn <willemb@google.com>,
netdev@vger.kernel.org, eric.dumazet@gmail.com,
Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH v2 net-next 00/14] net_sched: speedup qdisc dequeue
Date: Tue, 11 Nov 2025 17:43:40 +0100 [thread overview]
Message-ID: <87jyzwldtv.fsf@toke.dk> (raw)
In-Reply-To: <20251111093204.1432437-1-edumazet@google.com>
Eric Dumazet <edumazet@google.com> writes:
> 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)
>
> v2: - Fixed issues reported by Jakub (thanks !)
> - Added three patches adding/using qdisc_dequeue_drop() after
> recent regressions with CAKE qdisc reported by Toke.
> More fixes to come later.
>
> v1: https://lore.kernel.org/netdev/20251110094505.3335073-1-edumazet@google.com/T/#m8f562ed148f807c02fd02c6cd243604d449615b9
>
> Eric Dumazet (14):
> 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: use qdisc_pkt_len_segs_init() in sch_handle_ingress()
> 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()
> net_sched: add tcf_kfree_skb_list() helper
> net_sched: add qdisc_dequeue_drop() helper
> net_sched: use qdisc_dequeue_drop() in cake, codel, fq_codel
As mentioned in the other thread[0], I tested this series and it
definitely seems to improve things, so feel free to add my:
Tested-by: Toke Høiland-Jørgensen <toke@redhat.com>
prev parent reply other threads:[~2025-11-11 16:43 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-11 9:31 [PATCH v2 net-next 00/14] net_sched: speedup qdisc dequeue Eric Dumazet
2025-11-11 9:31 ` [PATCH v2 net-next 01/14] net_sched: make room for (struct qdisc_skb_cb)->pkt_segs Eric Dumazet
2025-11-11 9:31 ` [PATCH v2 net-next 02/14] net: init shinfo->gso_segs from qdisc_pkt_len_init() Eric Dumazet
2025-11-11 9:31 ` [PATCH v2 net-next 03/14] net_sched: initialize qdisc_skb_cb(skb)->pkt_segs in qdisc_pkt_len_init() Eric Dumazet
2025-11-11 9:31 ` [PATCH v2 net-next 04/14] net: use qdisc_pkt_len_segs_init() in sch_handle_ingress() Eric Dumazet
2025-11-11 9:31 ` [PATCH v2 net-next 05/14] net_sched: use qdisc_skb_cb(skb)->pkt_segs in bstats_update() Eric Dumazet
2025-11-11 9:31 ` [PATCH v2 net-next 06/14] net_sched: cake: use qdisc_pkt_segs() Eric Dumazet
2025-11-11 9:31 ` [PATCH v2 net-next 07/14] net_sched: add Qdisc_read_mostly and Qdisc_write groups Eric Dumazet
2025-11-11 9:31 ` [PATCH v2 net-next 08/14] net_sched: sch_fq: move qdisc_bstats_update() to fq_dequeue_skb() Eric Dumazet
2025-11-11 9:31 ` [PATCH v2 net-next 09/14] net_sched: sch_fq: prefetch one skb ahead in dequeue() Eric Dumazet
2025-11-11 9:31 ` [PATCH v2 net-next 10/14] net: prefech skb->priority in __dev_xmit_skb() Eric Dumazet
2025-11-11 9:32 ` [PATCH v2 net-next 11/14] net: annotate a data-race " Eric Dumazet
2025-11-11 9:32 ` [PATCH v2 net-next 12/14] net_sched: add tcf_kfree_skb_list() helper Eric Dumazet
2025-11-11 9:32 ` [PATCH v2 net-next 13/14] net_sched: add qdisc_dequeue_drop() helper Eric Dumazet
2025-11-11 9:32 ` [PATCH v2 net-next 14/14] net_sched: use qdisc_dequeue_drop() in cake, codel, fq_codel Eric Dumazet
2025-11-11 14:09 ` [syzbot ci] Re: net_sched: speedup qdisc dequeue syzbot ci
2025-11-11 16:28 ` Eric Dumazet
2025-11-11 19:23 ` Eric Dumazet
2025-11-11 19:44 ` Eric Dumazet
2025-11-11 21:04 ` Victor Nogueira
2025-11-11 21:34 ` Jamal Hadi Salim
2025-11-12 12:21 ` Eric Dumazet
2025-11-11 16:43 ` Toke Høiland-Jørgensen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87jyzwldtv.fsf@toke.dk \
--to=toke@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=horms@kernel.org \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=willemb@google.com \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).