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

Side by Side Diff: net/quic/quic_flow_controller.cc

Issue 1873673002: relnote: Deprecate --quic_auto_tune_receive_window. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@01_CL_118974770
Patch Set: Created 4 years, 8 months 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 unified diff | Download patch
« no previous file with comments | « net/quic/quic_flags.cc ('k') | net/quic/quic_flow_controller_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/quic_flow_controller.h" 5 #include "net/quic/quic_flow_controller.h"
6 6
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "net/quic/quic_bug_tracker.h" 8 #include "net/quic/quic_bug_tracker.h"
9 #include "net/quic/quic_connection.h" 9 #include "net/quic/quic_connection.h"
10 #include "net/quic/quic_flags.h" 10 #include "net/quic/quic_flags.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 void QuicFlowController::MaybeIncreaseMaxWindowSize() { 103 void QuicFlowController::MaybeIncreaseMaxWindowSize() {
104 // Core of receive window auto tuning. This method should be called before a 104 // Core of receive window auto tuning. This method should be called before a
105 // WINDOW_UPDATE frame is sent. Ideally, window updates should occur close to 105 // WINDOW_UPDATE frame is sent. Ideally, window updates should occur close to
106 // once per RTT. If a window update happens much faster than RTT, it implies 106 // once per RTT. If a window update happens much faster than RTT, it implies
107 // that the flow control window is imposing a bottleneck. To prevent this, 107 // that the flow control window is imposing a bottleneck. To prevent this,
108 // this method will increase the receive window size (subject to a reasonable 108 // this method will increase the receive window size (subject to a reasonable
109 // upper bound). For simplicity this algorithm is deliberately asymmetric, in 109 // upper bound). For simplicity this algorithm is deliberately asymmetric, in
110 // that it may increase window size but never decreases. 110 // that it may increase window size but never decreases.
111 111
112 if (!FLAGS_quic_auto_tune_receive_window) {
113 return;
114 }
115
116 // Keep track of timing between successive window updates. 112 // Keep track of timing between successive window updates.
117 QuicTime now = connection_->clock()->ApproximateNow(); 113 QuicTime now = connection_->clock()->ApproximateNow();
118 QuicTime prev = prev_window_update_time_; 114 QuicTime prev = prev_window_update_time_;
119 prev_window_update_time_ = now; 115 prev_window_update_time_ = now;
120 if (!prev.IsInitialized()) { 116 if (!prev.IsInitialized()) {
121 DVLOG(1) << ENDPOINT << "first window update for stream " << id_; 117 DVLOG(1) << ENDPOINT << "first window update for stream " << id_;
122 return; 118 return;
123 } 119 }
124 120
125 if (!auto_tune_receive_window_) { 121 if (!auto_tune_receive_window_) {
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 if (receive_window_size_ != receive_window_offset_) { 245 if (receive_window_size_ != receive_window_offset_) {
250 QUIC_BUG << "receive_window_size_:" << receive_window_size_ 246 QUIC_BUG << "receive_window_size_:" << receive_window_size_
251 << " != receive_window_offset:" << receive_window_offset_; 247 << " != receive_window_offset:" << receive_window_offset_;
252 return; 248 return;
253 } 249 }
254 receive_window_size_ = size; 250 receive_window_size_ = size;
255 receive_window_offset_ = size; 251 receive_window_offset_ = size;
256 } 252 }
257 253
258 } // namespace net 254 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_flags.cc ('k') | net/quic/quic_flow_controller_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698