Skip to content

net/sched: act_police: lockless data path

Davide Caratti netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2net/sched: act_police: use per-cpu countersnet/sched/act_police.c+22 -240 replies
2/2net/sched: act_police: don't use spinlock in the data pathnet/sched/act_police.c+92 -648 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net-next 0/2] net/sched: act_police: lockless data path

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 \
Quoted 1 line

rate 2gbit burst 100k conform-exceed pass/pass index 100

 # for c in 1 2 4; do
Quoted 2 lines

./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(-)
Signature · 1 line
2.17.1