net/sched: remove spinlock from 'csum' action
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest2 patches 2 repliesIn review
- v22 patches 2 repliesSuperseded
- v12 patches 2 repliesSuperseded
Changes in v3 from the cover letter
- use rtnl_dereference() in place of rcu_dereference() in tcf_csum_dump()
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | net/sched: act_csum: use per-core statisticsnet/ | +4 | 0 replies | |
| 2/2 | net/sched: act_csum: don't use spinlock in the fast pathinclude/ net/ | +59 | 0 replies |
Reviews trailers per patch
None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Cong Wang |
|---|---|
| Series | A-b |
| 1/2 | |
| 2/2 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH net-next v3 0/2] net/sched: remove spinlock from 'csum' action
Similarly to what has been done earlier with other actions [1][2], this series tries to improve the performance of 'csum' tc action, removing a spinlock in the data path. Patch 1 lets act_csum use per-CPU counters; patch 2 removes spin_{,un}lock_bh() calls from the act() method.
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 root handle 1: prio # for a in pass drop; do
Quoted 6 lines
tc filter del dev eth1 parent 1: pref 10 matchall action csum udp tc filter add dev eth1 parent 1: pref 10 matchall action csum udp $a for n in 2 4; do
./pktgen_bench_xmit_mode_queue_xmit.sh -v -s 64 -t $n -n 1000000 -i eth1 done
done
test results:
| | before patch | after patch $a | $n | avg. pps/thread | avg. pps/thread -----+----+-----------------+---------------- pass | 2 | 1671463 ± 4% | 1920789 ± 3% pass | 4 | 648797 ± 1% | 738190 ± 1% drop | 2 | 3212692 ± 2% | 3719811 ± 2% drop | 4 | 1078824 ± 1% | 1328099 ± 1%
references:
[1] https://www.spinics.net/lists/netdev/msg334760.html
[2] https://www.spinics.net/lists/netdev/msg465862.html
v3 changes:
- use rtnl_dereference() in place of rcu_dereference() in tcf_csum_dump()
v2 changes:
- add 'drop' test, it produces more contentions
- use RCU-protected struct to store 'action' and 'update_flags', to avoid reading the values from subsequent configurations
Davide Caratti (2):
net/sched: act_csum: use per-core statistics net/sched: act_csum: don't use spinlock in the fast path
include/net/tc_act/tc_csum.h | 16 +++++++++-- net/sched/act_csum.c | 66 ++++++++++++++++++++++++++++++++------------ 2 files changed, 62 insertions(+), 20 deletions(-)
Signature · 1 line
2.14.3