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

Issue 10916016: Switch the TCP reads on Windows to use non-blocking/non-async I/O. (Closed)

Created:
8 years, 3 months ago by pmeenan
Modified:
6 years, 6 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

Switch the TCP reads on Windows to use non-blocking/non-async I/O. The Overlapped I/O was introducing delays when the networking stack did not have enough data to fill the receive buffer. This can be seen when loading pssplayground.com/ksimbili/webp.html using a DSL connection profile on WebPagetest: http://www.webpagetest.org/result/120830_MS_414849a6aa055bb853e7e5d51e1b29d8/ and manifests and increasingly long Time to First Byte for requests further down the waterfall (expected values are < 90ms and it was going over 150ms). It is configured as a 50% field trial and can be forced through the command-line for testing: --overlapped-reads=on - default/existing behavior --overlapped-reads=off - new read implementation Trial-specific histograms are reported for page load times and http request times. Specifically: PLT.Abandoned PLT.LoadType PLT.BeginToFinish_NormalLoad PLT.BeginToFinish_LinkLoadNormal PLT.BeginToFinish_LinkLoadReload PLT.BeginToFinish_LinkLoadStaleOk Net.HttpJob.TotalTime Net.HttpJob.TotalTimeSuccess Net.HttpJob.TotalTimeCancel Net.HttpJob.TotalTimeCached Net.HttpJob.TotalTimeNotCached Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=165170

Patch Set 1 #

Total comments: 9

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 5

Patch Set 5 : #

Patch Set 6 : #

Total comments: 36

Patch Set 7 : #

Total comments: 27

Patch Set 8 : #

Patch Set 9 : #

Total comments: 13

Patch Set 10 : #

Patch Set 11 : #

Total comments: 10

Patch Set 12 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+261 lines, -50 lines) Patch
M chrome/browser/chrome_browser_field_trials.h View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/chrome_browser_field_trials.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +27 lines, -1 line 0 comments Download
M chrome/common/chrome_switches.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_switches.cc View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/renderer/page_load_histograms.cc View 1 2 3 4 5 6 7 8 1 chunk +37 lines, -0 lines 0 comments Download
M net/socket/tcp_client_socket_win.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -0 lines 0 comments Download
M net/socket/tcp_client_socket_win.cc View 1 2 3 4 5 6 7 8 9 10 11 13 chunks +136 lines, -49 lines 0 comments Download
M net/url_request/url_request_http_job.cc View 1 2 3 4 5 6 7 8 2 chunks +44 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
slamm_google
Here are some teeny nits for you. https://chromiumcodereview.appspot.com/10916016/diff/1/net/socket/tcp_client_socket_win.cc File net/socket/tcp_client_socket_win.cc (right): https://chromiumcodereview.appspot.com/10916016/diff/1/net/socket/tcp_client_socket_win.cc#newcode31 net/socket/tcp_client_socket_win.cc:31: const bool ...
8 years, 3 months ago (2012-08-30 17:47:25 UTC) #1
pmeenan
Thanks, Updated patch with the changes as well as using the Field Trials framework will ...
8 years, 3 months ago (2012-08-30 17:54:30 UTC) #2
pmeenan
https://chromiumcodereview.appspot.com/10916016/diff/1/net/socket/tcp_client_socket_win.cc File net/socket/tcp_client_socket_win.cc (right): https://chromiumcodereview.appspot.com/10916016/diff/1/net/socket/tcp_client_socket_win.cc#newcode765 net/socket/tcp_client_socket_win.cc:765: int rv = WSARecv(socket_, &core_->read_buffer_, 1, &num, &flags, On ...
8 years, 3 months ago (2012-08-31 15:05:23 UTC) #3
Ryan Sleevi
Initial set of style nits. Will take a closer look at the implementation in a ...
8 years, 2 months ago (2012-10-11 18:53:16 UTC) #4
pmeenan
Thanks, uploaded a new patch with the styles cleaned up. NBRead naming is gone for ...
8 years, 2 months ago (2012-10-11 20:16:18 UTC) #5
wtc
pmeenan: thank you for the CL. rvargas: could you also review the tcp_client_socket_win.{h,cc} changes? Thanks.
8 years, 2 months ago (2012-10-12 18:13:04 UTC) #6
Ryan Sleevi
https://chromiumcodereview.appspot.com/10916016/diff/19001/chrome/browser/chrome_browser_field_trials.cc File chrome/browser/chrome_browser_field_trials.cc (right): https://chromiumcodereview.appspot.com/10916016/diff/19001/chrome/browser/chrome_browser_field_trials.cc#newcode33 chrome/browser/chrome_browser_field_trials.cc:33: #endif // defined(OS_WIN) style nit: Platform defines like go ...
8 years, 2 months ago (2012-10-12 18:53:13 UTC) #7
slamm
Here are a few nits of my own. https://chromiumcodereview.appspot.com/10916016/diff/19001/chrome/common/chrome_switches.cc File chrome/common/chrome_switches.cc (right): https://chromiumcodereview.appspot.com/10916016/diff/19001/chrome/common/chrome_switches.cc#newcode1550 chrome/common/chrome_switches.cc:1550: // ...
8 years, 2 months ago (2012-10-12 21:07:15 UTC) #8
rvargas (doing something else)
I suggest adding field trial histograms somewhere under net to have another data point. Maybe ...
8 years, 2 months ago (2012-10-13 03:34:06 UTC) #9
pmeenan
Thanks for the great feedback. I think I addressed all of the issues except for ...
8 years, 2 months ago (2012-10-17 15:12:31 UTC) #10
wtc
Review comments on patch set 7: pmeenan: Thank you for the patch. I only reviewed ...
8 years, 2 months ago (2012-10-18 23:17:10 UTC) #11
pmeenan
Thanks for the feedback. Changes applied (plus a few comments). Thanks everyone for putting up ...
8 years, 2 months ago (2012-10-19 20:49:40 UTC) #12
pmeenan
ok, just added the histograms around Net.HttpJob.TotalTime which is the last piece I was looking ...
8 years, 1 month ago (2012-10-22 18:55:50 UTC) #13
rvargas (doing something else)
Some extra nits. https://codereview.chromium.org/10916016/diff/45001/chrome/browser/chrome_browser_field_trials.cc File chrome/browser/chrome_browser_field_trials.cc (right): https://codereview.chromium.org/10916016/diff/45001/chrome/browser/chrome_browser_field_trials.cc#newcode68 chrome/browser/chrome_browser_field_trials.cc:68: trial->UseOneTimeRandomization(); nit: indent 2 spaces. https://codereview.chromium.org/10916016/diff/45001/chrome/browser/chrome_browser_field_trials.cc#newcode603 ...
8 years, 1 month ago (2012-10-23 00:19:40 UTC) #14
pmeenan
I went ahead and refactored the Read() code to be shared so that DidSignalRead() can ...
8 years, 1 month ago (2012-10-23 14:29:54 UTC) #15
rvargas (doing something else)
Thanks. LGTM. https://codereview.chromium.org/10916016/diff/45001/chrome/common/chrome_switches.cc File chrome/common/chrome_switches.cc (right): https://codereview.chromium.org/10916016/diff/45001/chrome/common/chrome_switches.cc#newcode1545 chrome/common/chrome_switches.cc:1545: // The default is "on" which matches ...
8 years, 1 month ago (2012-10-24 18:48:09 UTC) #16
slamm
More small stuff. https://codereview.chromium.org/10916016/diff/46009/chrome/browser/chrome_browser_field_trials.cc File chrome/browser/chrome_browser_field_trials.cc (right): https://codereview.chromium.org/10916016/diff/46009/chrome/browser/chrome_browser_field_trials.cc#newcode608 chrome/browser/chrome_browser_field_trials.cc:608: kOverlappedReadProbability); Indent kOverlappedReadProbability under the first ...
8 years, 1 month ago (2012-10-25 19:51:48 UTC) #17
pmeenan
https://codereview.chromium.org/10916016/diff/46009/chrome/browser/chrome_browser_field_trials.cc File chrome/browser/chrome_browser_field_trials.cc (right): https://codereview.chromium.org/10916016/diff/46009/chrome/browser/chrome_browser_field_trials.cc#newcode608 chrome/browser/chrome_browser_field_trials.cc:608: kOverlappedReadProbability); On 2012/10/25 19:51:48, slamm wrote: > Indent kOverlappedReadProbability ...
8 years, 1 month ago (2012-10-26 14:03:49 UTC) #18
pmeenan
+ben@ for owners review on the experiment code, histograms and switches
8 years, 1 month ago (2012-10-26 14:05:47 UTC) #19
Ben Goodger (Google)
did rvargas review the chrome stuff too?
8 years, 1 month ago (2012-10-26 19:37:55 UTC) #20
pmeenan
On 2012/10/26 19:37:55, Ben Goodger (Google) wrote: > did rvargas review the chrome stuff too? ...
8 years, 1 month ago (2012-10-26 19:51:45 UTC) #21
Ben Goodger (Google)
owner lgtm then.
8 years, 1 month ago (2012-10-26 19:55:08 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pmeenan@google.com/10916016/54001
8 years, 1 month ago (2012-10-31 13:07:26 UTC) #23
commit-bot: I haz the power
8 years, 1 month ago (2012-10-31 15:39:26 UTC) #24
Change committed as 165170

Powered by Google App Engine
This is Rietveld 408576698