diff options
| author | Stephen Hemminger <shemminger@osdl.org> | 2004-05-08 01:28:54 -0700 |
|---|---|---|
| committer | David S. Miller <davem@nuts.davemloft.net> | 2004-05-08 01:28:54 -0700 |
| commit | 54d05783ee595b109c209b1febabd9337bf3e0b6 (patch) | |
| tree | 84fdec233fac28584cca8ce9e3a8e6a5e44a9624 /include/net | |
| parent | fbb3aa0df16c9a46bd05481cdae42d309fb42dab (diff) | |
[TCP]: BIC TCP for Linux 2.6.6
This is a version of Binary Increase Control (BIC) TCP
developed by NCSU. It is yet another TCP congestion control
algorithm for handling big fat pipes. For normal size congestion
windows it behaves the same as existing TCP Reno, but when window
is large it uses additive increase to ensure fairness and when
window is small it uses binary search increase.
For more details see the BIC TCP web page
http://www.csc.ncsu.edu/faculty/rhee/export/bitcp/
The original code was for web100 (2.4); this version is pretty
much the same but targeted for 2.6 with less sysctl parameters
and more constants.
I don't have a real high speed long haul network to test, but
when running over 1G links with delays, the performance is more stable
(ie tests are repeatable) and as fast as existing Reno.
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/tcp.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index 8dc4be5b1ccb..cba1f701ee24 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -509,6 +509,25 @@ static __inline__ int tcp_sk_listen_hashfn(struct sock *sk) # define TCP_TW_RECYCLE_TICK (12+2-TCP_TW_RECYCLE_SLOTS_LOG) #endif +#define BICTCP_1_OVER_BETA 8 /* + * Fast recovery + * multiplicative decrease factor + */ +#define BICTCP_MAX_INCREMENT 32 /* + * Limit on the amount of + * increment allowed during + * binary search. + */ +#define BICTCP_FUNC_OF_MIN_INCR 11 /* + * log(B/Smin)/log(B/(B-1))+1, + * Smin:min increment + * B:log factor + */ +#define BICTCP_B 4 /* + * In binary search, + * go to point (max+min)/N + */ + /* * TCP option */ @@ -588,6 +607,9 @@ extern int sysctl_tcp_vegas_alpha; extern int sysctl_tcp_vegas_beta; extern int sysctl_tcp_vegas_gamma; extern int sysctl_tcp_nometrics_save; +extern int sysctl_tcp_bic; +extern int sysctl_tcp_bic_fast_convergence; +extern int sysctl_tcp_bic_low_window; extern atomic_t tcp_memory_allocated; extern atomic_t tcp_sockets_allocated; @@ -1207,11 +1229,30 @@ static __inline__ unsigned int tcp_packets_in_flight(struct tcp_opt *tp) /* Recalculate snd_ssthresh, we want to set it to: * + * Reno: * one half the current congestion window, but no * less than two segments + * + * BIC: + * behave like Reno until low_window is reached, + * then increase congestion window slowly */ static inline __u32 tcp_recalc_ssthresh(struct tcp_opt *tp) { + if (sysctl_tcp_bic) { + if (sysctl_tcp_bic_fast_convergence && + tp->snd_cwnd < tp->bictcp.last_max_cwnd) + tp->bictcp.last_max_cwnd + = (tp->snd_cwnd * (2*BICTCP_1_OVER_BETA-1)) + / (BICTCP_1_OVER_BETA/2); + else + tp->bictcp.last_max_cwnd = tp->snd_cwnd; + + if (tp->snd_cwnd > sysctl_tcp_bic_low_window) + return max(tp->snd_cwnd - (tp->snd_cwnd/BICTCP_1_OVER_BETA), + 2U); + } + return max(tp->snd_cwnd >> 1U, 2U); } |
