|
|
Log in / Subscribe / Register

net: optimize TX throughput and efficiency

From:  Eric Dumazet <edumazet-AT-google.com>
To:  "David S . Miller" <davem-AT-davemloft.net>, Jakub Kicinski <kuba-AT-kernel.org>, Paolo Abeni <pabeni-AT-redhat.com>
Subject:  [PATCH v2 net-next 0/6] net: optimize TX throughput and efficiency
Date:  Tue, 14 Oct 2025 17:19:01 +0000
Message-ID:  <20251014171907.3554413-1-edumazet@google.com>
Cc:  Simon Horman <horms-AT-kernel.org>, Jamal Hadi Salim <jhs-AT-mojatatu.com>, Cong Wang <xiyou.wangcong-AT-gmail.com>, Jiri Pirko <jiri-AT-resnulli.us>, Kuniyuki Iwashima <kuniyu-AT-google.com>, Willem de Bruijn <willemb-AT-google.com>, netdev-AT-vger.kernel.org, eric.dumazet-AT-gmail.com, Eric Dumazet <edumazet-AT-google.com>
Archive-link:  Article

In this series, I replace the busylock spinlock we have in
__dev_queue_xmit() and use lockless list (llist) to reduce
spinlock contention to the minimum.

Idea is that only one cpu might spin on the qdisc spinlock,
while others simply add their skb in the llist.

After this series, we get a 300 % (4x) improvement on heavy TX workloads,
sending twice the number of packets per second, for half the cpu cycles.

v2: deflake tcp_user_timeout_user-timeout-probe.pkt.
    Ability to return a different code than NET_XMIT_SUCCESS
    when __dev_xmit_skb() has a single skb to send.

Eric Dumazet (6):
  selftests/net: packetdrill: unflake
    tcp_user_timeout_user-timeout-probe.pkt
  net: add add indirect call wrapper in skb_release_head_state()
  net/sched: act_mirred: add loop detection
  Revert "net/sched: Fix mirred deadlock on device recursion"
  net: sched: claim one cache line in Qdisc
  net: dev_queue_xmit() llist adoption

 include/linux/netdevice_xmit.h                |  9 +-
 include/net/sch_generic.h                     | 23 ++---
 net/core/dev.c                                | 97 +++++++++++--------
 net/core/skbuff.c                             | 11 ++-
 net/sched/act_mirred.c                        | 62 +++++-------
 net/sched/sch_generic.c                       |  7 --
 .../tcp_user_timeout_user-timeout-probe.pkt   |  6 +-
 7 files changed, 111 insertions(+), 104 deletions(-)

-- 
2.51.0.788.g6d19910ace-goog




Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds