netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/3] Some optimization for lockless qdisc
@ 2021-05-28  2:49 Yunsheng Lin
  2021-05-28  2:49 ` [PATCH net-next 1/3] net: sched: avoid unnecessary seqcount operation " Yunsheng Lin
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Yunsheng Lin @ 2021-05-28  2:49 UTC (permalink / raw)
  To: davem, kuba
  Cc: olteanv, ast, daniel, andriin, edumazet, weiwan, cong.wang,
	ap420073, netdev, linux-kernel, linuxarm, mkl, linux-can, jhs,
	xiyou.wangcong, jiri, andrii, kafai, songliubraving, yhs,
	john.fastabend, kpsingh, bpf, jonas.bonn, pabeni, mzhivich,
	johunt, albcamus, kehuan.feng, a.fatoum, atenart,
	alexander.duyck, hdanton, jgross, JKosina, mkubecek, bjorn,
	alobakin

Patch 1: remove unnecessary seqcount operation.
Patch 2: implement TCQ_F_CAN_BYPASS.
Patch 3: remove qdisc->empty.

Performance data for pktgen in queue_xmit mode + dummy netdev
with pfifo_fast:

 threads    unpatched           patched             delta
    1       2.60Mpps            3.21Mpps             +23%
    2       3.84Mpps            5.56Mpps             +44%
    4       5.52Mpps            5.58Mpps             +1%
    8       2.77Mpps            2.76Mpps             -0.3%
   16       2.24Mpps            2.23Mpps             +0.4%

Performance for IP forward testing: 1.05Mpps increases to
1.16Mpps, about 10% improvement.

V1: Drop RFC tag, Add nolock_qdisc_is_empty() and do the qdisc
    empty checking without the protection of qdisc->seqlock to
    aviod doing unnecessary spin_trylock() for contention case.
RFC v4: Use STATE_MISSED and STATE_DRAINING to indicate non-empty
        qdisc, and add patch 1 and 3.

Yunsheng Lin (3):
  net: sched: avoid unnecessary seqcount operation for lockless qdisc
  net: sched: implement TCQ_F_CAN_BYPASS for lockless qdisc
  net: sched: remove qdisc->empty for lockless qdisc

 include/net/sch_generic.h | 31 ++++++++++++++++++-------------
 net/core/dev.c            | 26 ++++++++++++++++++++++++--
 net/sched/sch_generic.c   | 23 ++++++++++++++++-------
 3 files changed, 58 insertions(+), 22 deletions(-)

-- 
2.7.4


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

end of thread, other threads:[~2021-06-02 16:28 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-28  2:49 [PATCH net-next 0/3] Some optimization for lockless qdisc Yunsheng Lin
2021-05-28  2:49 ` [PATCH net-next 1/3] net: sched: avoid unnecessary seqcount operation " Yunsheng Lin
2021-05-28  2:49 ` [PATCH net-next 2/3] net: sched: implement TCQ_F_CAN_BYPASS " Yunsheng Lin
2021-05-29  1:00   ` Jakub Kicinski
2021-05-29  1:44     ` Yunsheng Lin
2021-05-29  4:32       ` Jakub Kicinski
2021-05-29  7:03         ` Yunsheng Lin
2021-05-29 18:49           ` Jakub Kicinski
2021-05-30  1:37             ` Yunsheng Lin
2021-05-30 20:21               ` Jakub Kicinski
2021-05-31  0:40                 ` Yunsheng Lin
2021-05-31  1:10                   ` [Linuxarm] " Yunsheng Lin
2021-05-31 12:40                     ` Yunsheng Lin
2021-06-01  4:51                       ` Jakub Kicinski
2021-06-01  8:18                         ` Yunsheng Lin
2021-06-01 20:48                           ` Jakub Kicinski
2021-06-02  1:21                             ` Yunsheng Lin
2021-06-02 16:28                               ` Jakub Kicinski
2021-05-28  2:49 ` [PATCH net-next 3/3] net: sched: remove qdisc->empty " Yunsheng Lin

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).