Last active
September 6, 2017 06:48
-
-
Save astrataro/4decd22ad5d09abf6c2be822874e0a0d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- ./tcp_bbr.c 2017-09-06 14:32:38.000000000 +0800 | |
+++ ./tcp_tsunami.c 2017-09-06 14:38:50.000000000 +0800 | |
@@ -121,9 +121,9 @@ struct bbr { | |
#define CYCLE_LEN 8 /* number of phases in a pacing gain cycle */ | |
/* Window length of bw filter (in rounds): */ | |
-static const int bbr_bw_rtts = CYCLE_LEN + 2; | |
+static const int bbr_bw_rtts = CYCLE_LEN + 7; | |
/* Window length of min_rtt filter (in sec): */ | |
-static const u32 bbr_min_rtt_win_sec = 10; | |
+static const u32 bbr_min_rtt_win_sec = 20; | |
/* Minimum time (in ms) spent at bbr_cwnd_min_target in BBR_PROBE_RTT mode: */ | |
static const u32 bbr_probe_rtt_mode_ms = 200; | |
/* Skip TSO below the following bandwidth (bits/sec): */ | |
@@ -138,15 +138,15 @@ static const int bbr_high_gain = BBR_UN | |
/* The pacing gain of 1/high_gain in BBR_DRAIN is calculated to typically drain | |
* the queue created in BBR_STARTUP in a single round: | |
*/ | |
-static const int bbr_drain_gain = BBR_UNIT * 1000 / 2885; | |
+static const int bbr_drain_gain = BBR_UNIT * 1200 / 2885; | |
/* The gain for deriving steady-state cwnd tolerates delayed/stretched ACKs: */ | |
static const int bbr_cwnd_gain = BBR_UNIT * 2; | |
/* The pacing_gain values for the PROBE_BW gain cycle, to discover/share bw: */ | |
static const int bbr_pacing_gain[] = { | |
- BBR_UNIT * 5 / 4, /* probe for more available bw */ | |
+ BBR_UNIT * 3 / 2, /* probe for more available bw */ | |
BBR_UNIT * 3 / 4, /* drain queue and/or yield bw to other flows */ | |
- BBR_UNIT, BBR_UNIT, BBR_UNIT, /* cruise at 1.0*bw to utilize pipe, */ | |
- BBR_UNIT, BBR_UNIT, BBR_UNIT /* without creating excess queue... */ | |
+ BBR_UNIT * 9 / 8, BBR_UNIT * 9 / 8, BBR_UNIT * 9 / 8, /* cruise at 1.0*bw to utilize pipe, */ | |
+ BBR_UNIT * 9 / 8, BBR_UNIT * 9 / 8, BBR_UNIT * 9 / 8 /* without creating excess queue... */ | |
}; | |
/* Randomize the starting gain cycling phase over N phases: */ | |
static const u32 bbr_cycle_rand = 7; | |
@@ -432,7 +432,7 @@ static void bbr_set_cwnd(struct sock *sk | |
done: | |
tp->snd_cwnd = min(cwnd, tp->snd_cwnd_clamp); /* apply global cap */ | |
if (bbr->mode == BBR_PROBE_RTT) /* drain queue, refresh min_rtt */ | |
- tp->snd_cwnd = min(tp->snd_cwnd, bbr_cwnd_min_target); | |
+ tp->snd_cwnd = max(tp->snd_cwnd >> 1, bbr_cwnd_min_target); | |
} | |
/* End cycle phase if it's time and/or we hit the phase's in-flight target. */ | |
@@ -786,7 +786,7 @@ static void bbr_update_min_rtt(struct so | |
if (!bbr->probe_rtt_done_stamp && | |
tcp_packets_in_flight(tp) <= bbr_cwnd_min_target) { | |
bbr->probe_rtt_done_stamp = tcp_jiffies32 + | |
- msecs_to_jiffies(bbr_probe_rtt_mode_ms); | |
+ msecs_to_jiffies(bbr_probe_rtt_mode_ms >> 1); | |
bbr->probe_rtt_round_done = 0; | |
bbr->next_rtt_delivered = tp->delivered; | |
} else if (bbr->probe_rtt_done_stamp) { | |
@@ -919,7 +919,7 @@ static void bbr_set_state(struct sock *s | |
static struct tcp_congestion_ops tcp_bbr_cong_ops __read_mostly = { | |
.flags = TCP_CONG_NON_RESTRICTED, | |
- .name = "bbr", | |
+ .name = "tsunami", | |
.owner = THIS_MODULE, | |
.init = bbr_init, | |
.cong_control = bbr_main, | |
@@ -951,4 +951,4 @@ MODULE_AUTHOR("Neal Cardwell <ncardwell@ | |
MODULE_AUTHOR("Yuchung Cheng <ycheng@google.com>"); | |
MODULE_AUTHOR("Soheil Hassas Yeganeh <soheil@google.com>"); | |
MODULE_LICENSE("Dual BSD/GPL"); | |
-MODULE_DESCRIPTION("TCP BBR (Bottleneck Bandwidth and RTT)"); | |
+MODULE_DESCRIPTION("TCP TSUNAMI (Bottleneck Bandwidth and RTT)"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment