Eric Dumazet
f278b99ca6
tcp_cubic: refactor code to perform a divide only when needed
...
Neal Cardwell suggested to not change ca->delay_min
and apply the ack delay cushion only when Hystart ACK train
is still under consideration. This should avoid a 64bit
divide unless needed.
Tested:
40Gbit(mlx4) testbed (with sch_fq as packet scheduler)
$ echo -n 'file tcp_cubic.c +p' >/sys/kernel/debug/dynamic_debug/control
$ nstat -n;for f in {1..10}; do ./super_netperf 1 -H lpaa24 -l -4000000; done;nstat|egrep "Hystart"
14815
16280
15293
15563
11574
15145
14789
18548
16972
12520
TcpExtTCPHystartTrainDetect 10 0.0
TcpExtTCPHystartTrainCwnd 1396 0.0
$ dmesg | tail -10
[ 4873.951350] hystart_ack_train (116 > 93) delay_min 24 (+ ack_delay 69) cwnd 80
[ 4875.155379] hystart_ack_train (55 > 50) delay_min 21 (+ ack_delay 29) cwnd 160
[ 4876.333921] hystart_ack_train (69 > 62) delay_min 23 (+ ack_delay 39) cwnd 130
[ 4877.519037] hystart_ack_train (69 > 60) delay_min 22 (+ ack_delay 38) cwnd 130
[ 4878.701559] hystart_ack_train (87 > 63) delay_min 24 (+ ack_delay 39) cwnd 160
[ 4879.844597] hystart_ack_train (93 > 50) delay_min 21 (+ ack_delay 29) cwnd 216
[ 4880.956650] hystart_ack_train (74 > 67) delay_min 20 (+ ack_delay 47) cwnd 108
[ 4882.098500] hystart_ack_train (61 > 57) delay_min 23 (+ ack_delay 34) cwnd 130
[ 4883.262056] hystart_ack_train (72 > 67) delay_min 21 (+ ack_delay 46) cwnd 130
[ 4884.418760] hystart_ack_train (74 > 67) delay_min 29 (+ ack_delay 38) cwnd 152
10Gbit(bnx2x) testbed (with sch_fq as packet scheduler)
$ echo -n 'file tcp_cubic.c +p' >/sys/kernel/debug/dynamic_debug/control
$ nstat -n;for f in {1..10}; do ./super_netperf 1 -H lpk52 -l -4000000; done;nstat|egrep "Hystart"
7050
7065
7100
6900
7202
7263
7189
6869
7463
7034
TcpExtTCPHystartTrainDetect 10 0.0
TcpExtTCPHystartTrainCwnd 3199 0.0
$ dmesg | tail -10
[ 176.920012] hystart_ack_train (161 > 141) delay_min 83 (+ ack_delay 58) cwnd 264
[ 179.144645] hystart_ack_train (164 > 159) delay_min 120 (+ ack_delay 39) cwnd 444
[ 181.354527] hystart_ack_train (214 > 168) delay_min 125 (+ ack_delay 43) cwnd 436
[ 183.539565] hystart_ack_train (170 > 147) delay_min 96 (+ ack_delay 51) cwnd 326
[ 185.727309] hystart_ack_train (177 > 160) delay_min 61 (+ ack_delay 99) cwnd 128
[ 187.947142] hystart_ack_train (184 > 167) delay_min 123 (+ ack_delay 44) cwnd 367
[ 190.166680] hystart_ack_train (230 > 153) delay_min 116 (+ ack_delay 37) cwnd 444
[ 192.327285] hystart_ack_train (210 > 206) delay_min 86 (+ ack_delay 120) cwnd 152
[ 194.511392] hystart_ack_train (173 > 151) delay_min 94 (+ ack_delay 57) cwnd 239
[ 196.736023] hystart_ack_train (149 > 146) delay_min 105 (+ ack_delay 41) cwnd 399
Fixes: 42f3a8aaae66 ("tcp_cubic: tweak Hystart detection for short RTT flows")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Neal Cardwell <ncardwell@google.com>
Link: https://www.spinics.net/lists/netdev/msg621886.html
Link: https://www.spinics.net/lists/netdev/msg621797.html
Acked-by: Neal Cardwell <ncardwell@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-12-30 14:44:27 -08:00
..
2019-07-06 12:50:01 +02:00
2019-09-27 15:10:34 -07:00
2019-12-09 10:36:44 -08:00
2019-12-25 19:51:33 -08:00
2019-09-24 16:37:18 +02:00
2019-12-12 21:38:57 -08:00
2019-11-06 16:14:48 -08:00
2019-12-09 10:36:44 -08:00
2019-12-12 21:38:57 -08:00
2019-12-18 17:05:58 -08:00
2019-07-12 16:03:16 -07:00
2019-12-22 15:15:05 -08:00
2019-11-02 13:54:56 -07:00
2019-12-08 11:52:02 +01:00
2019-11-27 22:28:37 +01:00
2019-12-30 14:22:11 -08:00
2019-12-09 10:36:44 -08:00
2019-11-06 16:14:48 -08:00
2019-07-10 18:43:43 -07:00
2019-12-28 11:43:41 -08:00
2019-11-07 20:07:30 -08:00
2019-12-27 16:40:02 -08:00
2019-12-05 12:09:02 -08:00
2019-11-02 13:54:56 -07:00
2019-09-26 08:56:17 +02:00
2019-12-30 14:44:27 -08:00
2019-12-24 22:37:30 -08:00
2019-12-09 10:36:44 -08:00
2019-09-27 10:27:14 +02:00
2019-07-08 19:48:57 -07:00
2019-12-04 12:27:12 -08:00
2019-06-23 13:24:17 -07:00
2019-06-17 20:20:36 -07:00
2019-12-20 21:19:36 -08:00
2019-12-13 10:34:04 +01:00
2019-12-04 12:27:13 -08:00
2019-09-19 18:04:40 -07:00
2019-12-30 14:22:11 -08:00
2019-09-01 11:45:02 -07:00
2019-12-09 10:36:44 -08:00
2019-10-24 14:53:48 -07:00
2019-12-18 11:57:33 -08:00
2019-06-19 17:09:55 +02:00
2019-12-24 22:24:45 -08:00
2019-12-26 15:19:59 -08:00
2019-10-28 13:33:41 -07:00
2019-11-26 14:40:13 -08:00
2019-10-30 17:58:23 -07:00
2019-11-16 21:51:42 -08:00
2019-12-16 10:15:49 +01:00
2019-11-06 16:14:48 -08:00
2019-12-09 10:36:44 -08:00
2019-12-22 15:15:05 -08:00
2019-12-27 16:34:51 -08:00
2019-12-22 15:15:05 -08:00
2019-06-22 08:59:24 -04:00
2019-12-07 16:56:00 -08:00
2019-12-22 15:15:05 -08:00
2019-12-19 17:46:51 -08:00
2019-12-22 15:15:05 -08:00
2019-12-22 15:15:05 -08:00
2019-08-10 15:25:47 -07:00
2019-12-22 15:15:05 -08:00
2019-12-09 10:28:43 -08:00
2019-12-27 14:20:10 -08:00
2019-11-25 20:02:57 -08:00
2019-11-15 14:38:29 +01:00
2019-12-27 16:40:01 -08:00
2019-12-12 17:07:05 -08:00
2019-12-22 15:15:05 -08:00