Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1461)

Unified Diff: net/quic/core/congestion_control/cubic.cc

Issue 2569723004: relnote: Protected by --quic_fix_beta_last_max. Fix conservative decrease for n-connection emulatio… (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/core/congestion_control/cubic.h ('k') | net/quic/core/congestion_control/cubic_bytes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/congestion_control/cubic.cc
diff --git a/net/quic/core/congestion_control/cubic.cc b/net/quic/core/congestion_control/cubic.cc
index 0d6ff818df41b35cf0adf9c0dd548da8f7c9305e..f0fb39c082fe9e8dde038d6b53bbf03a89cea9ed 100644
--- a/net/quic/core/congestion_control/cubic.cc
+++ b/net/quic/core/congestion_control/cubic.cc
@@ -41,7 +41,8 @@ Cubic::Cubic(const QuicClock* clock)
epoch_(QuicTime::Zero()),
app_limited_start_time_(QuicTime::Zero()),
last_update_time_(QuicTime::Zero()),
- fix_convex_mode_(false) {
+ fix_convex_mode_(false),
+ fix_beta_last_max_(false) {
Reset();
}
@@ -65,6 +66,16 @@ float Cubic::Beta() const {
return (num_connections_ - 1 + kBeta) / num_connections_;
}
+float Cubic::BetaLastMax() const {
+ // BetaLastMax is the additional backoff factor after loss for our
+ // N-connection emulation, which emulates the additional backoff of
+ // an ensemble of N TCP-Reno connections on a single loss event. The
+ // effective multiplier is computed as:
+ return fix_beta_last_max_
+ ? (num_connections_ - 1 + kBetaLastMax) / num_connections_
+ : kBetaLastMax;
+}
+
void Cubic::Reset() {
epoch_ = QuicTime::Zero(); // Reset time.
app_limited_start_time_ = QuicTime::Zero();
@@ -77,7 +88,6 @@ void Cubic::Reset() {
origin_point_congestion_window_ = 0;
time_to_origin_point_ = 0;
last_target_congestion_window_ = 0;
- fix_convex_mode_ = false;
}
void Cubic::OnApplicationLimited() {
@@ -90,13 +100,17 @@ void Cubic::SetFixConvexMode(bool fix_convex_mode) {
fix_convex_mode_ = fix_convex_mode;
}
+void Cubic::SetFixBetaLastMax(bool fix_beta_last_max) {
+ fix_beta_last_max_ = fix_beta_last_max;
+}
+
QuicPacketCount Cubic::CongestionWindowAfterPacketLoss(
QuicPacketCount current_congestion_window) {
if (current_congestion_window < last_max_congestion_window_) {
// We never reached the old max, so assume we are competing with another
// flow. Use our extra back off factor to allow the other flow to go up.
last_max_congestion_window_ =
- static_cast<int>(kBetaLastMax * current_congestion_window);
+ static_cast<int>(BetaLastMax() * current_congestion_window);
} else {
last_max_congestion_window_ = current_congestion_window;
}
« no previous file with comments | « net/quic/core/congestion_control/cubic.h ('k') | net/quic/core/congestion_control/cubic_bytes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698