netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] net/sched: act_police: lockless data path
@ 2018-09-13 17:29 Davide Caratti
  2018-09-13 17:29 ` [PATCH net-next 1/2] net/sched: act_police: use per-cpu counters Davide Caratti
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Davide Caratti @ 2018-09-13 17:29 UTC (permalink / raw)
  To: Jamal Hadi Salim, Cong Wang, Jiri Pirko, David S. Miller; +Cc: netdev

the data path of 'police' action can be faster if we avoid using spinlocks:
 - patch 1 converts act_police to use per-cpu counters
 - patch 2 lets act_police use RCU to access its configuration data.

test procedure (using pktgen from https://github.com/netoptimizer):
 # ip link add name eth1 type dummy
 # ip link set dev eth1 up
 # tc qdisc add dev eth1 clsact
 # tc filter add dev eth1 egress matchall action police \
 > rate 2gbit burst 100k conform-exceed pass/pass index 100
 # for c in 1 2 4; do
 > ./pktgen_bench_xmit_mode_queue_xmit.sh -v -s 64 -t $c -n 5000000 -i eth1
 > done

test results (avg. pps/thread):

  $c | before patch |  after patch | improvement
 ----+--------------+--------------+-------------
   1 |      3518448 |      3591240 |  irrelevant
   2 |      3070065 |      3383393 |         10%
   4 |      1540969 |      3238385 |        110%


Davide Caratti (2):
  net/sched: act_police: use per-cpu counters
  net/sched: act_police: don't use spinlock in the data path

 net/sched/act_police.c | 186 +++++++++++++++++++++++------------------
 1 file changed, 106 insertions(+), 80 deletions(-)

-- 
2.17.1

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

end of thread, other threads:[~2018-11-17  1:08 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-13 17:29 [PATCH net-next 0/2] net/sched: act_police: lockless data path Davide Caratti
2018-09-13 17:29 ` [PATCH net-next 1/2] net/sched: act_police: use per-cpu counters Davide Caratti
2018-09-13 17:29 ` [PATCH net-next 2/2] net/sched: act_police: don't use spinlock in the data path Davide Caratti
2018-11-15  6:46   ` Eric Dumazet
2018-11-15 11:43     ` Davide Caratti
2018-11-15 13:53       ` Eric Dumazet
2018-11-16 11:28         ` Davide Caratti
2018-11-16 14:34           ` Eric Dumazet
2018-11-16 14:39             ` Eric Dumazet
2018-11-16 14:41             ` David Laight
2018-11-16 14:55               ` Eric Dumazet
2018-09-16 22:32 ` [PATCH net-next 0/2] net/sched: act_police: lockless " David Miller

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