Jussi Maki 848ca9182a net: bonding: Use per-cpu rr_tx_counter
The round-robin rr_tx_counter was shared across CPUs leading to
significant cache thrashing at high packet rates. This patch switches
the round-robin packet counter to use a per-cpu variable to decide
the destination slave.

On a test with 2x100Gbit ICE nic with pktgen_sample_04_many_flows.sh
(-s 64 -t 32) the tx rate was 19.6Mpps before and 22.3Mpps after
this patch.

"perf top -e cache_misses" before:
    12.31%  [bonding]       [k] bond_xmit_roundrobin_slave_get
    10.59%  [sch_fq_codel]  [k] fq_codel_dequeue
     9.34%  [kernel]        [k] skb_release_data
after:
    15.42%  [sch_fq_codel]  [k] fq_codel_dequeue
    10.06%  [kernel]        [k] __memset
     9.12%  [kernel]        [k] skb_release_data

Signed-off-by: Jussi Maki <joamaki@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-06-15 11:26:15 -07:00
..
2021-05-05 13:24:11 -07:00
2021-05-21 13:55:32 -07:00
2021-05-16 10:13:14 -07:00
2021-04-18 09:36:56 +03:00
2021-05-15 08:52:30 -07:00
2021-04-26 12:11:52 -07:00
2021-05-20 06:31:52 -10:00
2021-04-28 15:59:13 -07:00
2021-05-20 14:46:26 -10:00
2021-04-26 12:11:52 -07:00
2021-05-20 20:15:43 -10:00
2021-04-27 18:09:44 -07:00
2021-05-20 06:31:52 -10:00
2021-05-01 10:14:08 -07:00
2021-04-08 19:18:07 +02:00
2021-05-05 13:24:11 -07:00
2021-05-13 14:53:49 -04:00
2021-04-28 15:59:13 -07:00
2021-05-20 06:40:20 -10:00
2021-06-11 12:50:32 -07:00
2021-05-01 10:14:08 -07:00
2021-04-29 11:57:23 -07:00
2021-05-05 12:53:16 -07:00
2021-04-28 15:59:13 -07:00
2021-05-04 11:13:33 -07:00
2021-05-05 13:24:11 -07:00
2021-05-03 12:15:21 -07:00
2021-05-20 14:41:35 -10:00
2021-05-01 09:33:00 -07:00
2021-05-08 10:44:36 -07:00
2021-05-17 16:06:02 +02:00
2021-05-20 06:31:52 -10:00
2021-05-01 09:33:00 -07:00
2021-05-20 06:31:52 -10:00
2021-04-28 15:59:13 -07:00
2021-05-05 13:31:39 -07:00