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

Issue 861963002: UDP: Windows implementation using non-blocking IO (Closed)

Created:
5 years, 11 months ago by Alpha Left Google
Modified:
5 years, 10 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

UDP: Windows implementation using non-blocking IO Non-blocking IO has higher throughput than the previous implementation that used overlapped IO. 15% increase in throughput for sending to localhost is observed. There could be additional performance advantage in WiFi network. All existing UDP socket tests passed. I added a unit test to do benchmarking. Also tested this manually with WebRTC and verified that all UDP send and receive activities are logged correctly. BUG=442392 Committed: https://crrev.com/5a5ee680f9fc9647e3b7228d181fc7e2bb7ddecf Cr-Commit-Position: refs/heads/master@{#314752}

Patch Set 1 #

Patch Set 2 : WSAEventSelect #

Total comments: 12

Patch Set 3 : fixed comments #

Patch Set 4 : added perf test #

Total comments: 46

Patch Set 5 : git cl try #

Total comments: 12

Patch Set 6 : nits #

Patch Set 7 : fixed test #

Patch Set 8 : nits #

Total comments: 12

Patch Set 9 : Moved out of core and used only one event #

Patch Set 10 : overlapped io by default #

Patch Set 11 : style nits #

Patch Set 12 : fix build #

Total comments: 15

Patch Set 13 : review comments #

Patch Set 14 : added boolean #

Patch Set 15 : use DCHECK #

Total comments: 1

Patch Set 16 : git cl formatted #

Patch Set 17 : use IsWatching() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+510 lines, -83 lines) Patch
M net/net.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M net/udp/udp_client_socket.h View 1 2 3 13 14 1 chunk +6 lines, -0 lines 0 comments Download
M net/udp/udp_client_socket.cc View 1 2 3 13 14 1 chunk +6 lines, -0 lines 0 comments Download
M net/udp/udp_server_socket.h View 1 2 3 13 14 1 chunk +6 lines, -0 lines 0 comments Download
M net/udp/udp_server_socket.cc View 1 2 3 13 14 1 chunk +6 lines, -0 lines 0 comments Download
A net/udp/udp_socket_perftest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +141 lines, -0 lines 0 comments Download
M net/udp/udp_socket_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 7 chunks +85 lines, -32 lines 0 comments Download
M net/udp/udp_socket_win.h View 1 2 3 4 5 6 7 8 13 14 15 16 7 chunks +50 lines, -10 lines 0 comments Download
M net/udp/udp_socket_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 13 chunks +209 lines, -41 lines 0 comments Download

Messages

Total messages: 35 (5 generated)
Alpha Left Google
5 years, 11 months ago (2015-01-21 03:14:23 UTC) #2
Ryan Hamilton
This change looks goodish to me, but it's window specific and I'm not super familiar ...
5 years, 11 months ago (2015-01-21 04:03:35 UTC) #4
Ryan Hamilton
In thinking about this more, I think we should make overlapped vs non-blocking determined at ...
5 years, 11 months ago (2015-01-21 04:54:32 UTC) #5
Alpha Left Google
On 2015/01/21 04:54:32, Ryan Hamilton wrote: > In thinking about this more, I think we ...
5 years, 11 months ago (2015-01-21 20:56:43 UTC) #6
Ryan Hamilton
On 2015/01/21 20:56:43, Alpha wrote: > On 2015/01/21 04:54:32, Ryan Hamilton wrote: > > In ...
5 years, 11 months ago (2015-01-21 21:09:15 UTC) #7
Alpha Left Google
On 2015/01/21 21:09:15, Ryan Hamilton wrote: > On 2015/01/21 20:56:43, Alpha wrote: > > On ...
5 years, 11 months ago (2015-01-21 21:26:40 UTC) #8
rvargas (doing something else)
I think it's going to take me a while to go ever this change, but ...
5 years, 11 months ago (2015-01-21 22:10:09 UTC) #9
Alpha Left Google
Addressing the comments first. I'll add the code to do overlapped IO back in the ...
5 years, 11 months ago (2015-01-22 01:01:26 UTC) #10
Alpha Left Google
I've added a method UDPSocketWin::UseNonBlocking() to switch to non blocking IO. I have retained the ...
5 years, 11 months ago (2015-01-22 02:56:36 UTC) #11
rvargas (doing something else)
https://chromiumcodereview.appspot.com/861963002/diff/60001/net/udp/udp_socket_perftest.cc File net/udp/udp_socket_perftest.cc (right): https://chromiumcodereview.appspot.com/861963002/diff/60001/net/udp/udp_socket_perftest.cc#newcode1 net/udp/udp_socket_perftest.cc:1: // Copyright (c) 2012 The Chromium Authors. All rights ...
5 years, 11 months ago (2015-01-22 23:45:14 UTC) #12
Alpha Left Google
https://codereview.chromium.org/861963002/diff/60001/net/udp/udp_socket_perftest.cc File net/udp/udp_socket_perftest.cc (right): https://codereview.chromium.org/861963002/diff/60001/net/udp/udp_socket_perftest.cc#newcode1 net/udp/udp_socket_perftest.cc:1: // Copyright (c) 2012 The Chromium Authors. All rights ...
5 years, 11 months ago (2015-01-23 02:29:47 UTC) #13
rvargas (doing something else)
https://chromiumcodereview.appspot.com/861963002/diff/60001/net/udp/udp_socket_unittest.cc File net/udp/udp_socket_unittest.cc (right): https://chromiumcodereview.appspot.com/861963002/diff/60001/net/udp/udp_socket_unittest.cc#newcode33 net/udp/udp_socket_unittest.cc:33: : buffer_(new IOBufferWithSize(kMaxRead)), weak_factory_(this) {} nit: I'd say this ...
5 years, 11 months ago (2015-01-23 03:05:35 UTC) #14
Alpha Left Google
https://codereview.chromium.org/861963002/diff/60001/net/udp/udp_socket_unittest.cc File net/udp/udp_socket_unittest.cc (right): https://codereview.chromium.org/861963002/diff/60001/net/udp/udp_socket_unittest.cc#newcode33 net/udp/udp_socket_unittest.cc:33: : buffer_(new IOBufferWithSize(kMaxRead)), weak_factory_(this) {} On 2015/01/23 03:05:34, rvargas ...
5 years, 11 months ago (2015-01-23 03:52:23 UTC) #15
rvargas (doing something else)
https://chromiumcodereview.appspot.com/861963002/diff/60001/net/udp/udp_socket_win.cc File net/udp/udp_socket_win.cc (right): https://chromiumcodereview.appspot.com/861963002/diff/60001/net/udp/udp_socket_win.cc#newcode126 net/udp/udp_socket_win.cc:126: WSAEVENT read_event_; On 2015/01/23 02:29:47, Alpha wrote: > On ...
5 years, 11 months ago (2015-01-23 20:05:25 UTC) #16
guoweis_left_chromium
spotted a typo. https://codereview.chromium.org/861963002/diff/140001/net/udp/udp_socket_win.cc File net/udp/udp_socket_win.cc (right): https://codereview.chromium.org/861963002/diff/140001/net/udp/udp_socket_win.cc#newcode50 net/udp/udp_socket_win.cc:50: // In non-blocking mode watch the ...
5 years, 11 months ago (2015-01-26 20:53:29 UTC) #17
Alpha Left Google
this patchset pretty much changed the entire patch: (1) I moved out all the code ...
5 years, 11 months ago (2015-01-27 01:52:27 UTC) #19
Alpha Left Google
rch: Since rvargas is OOO for the whole week. Would you like suggest another reviewer ...
5 years, 11 months ago (2015-01-27 01:53:38 UTC) #20
rvargas (doing something else)
Sorry for the delay. I was not really expecting a rewrite after the previous round ...
5 years, 10 months ago (2015-02-03 03:11:41 UTC) #21
rvargas (doing something else)
https://codereview.chromium.org/861963002/diff/240001/net/udp/udp_socket_win.cc File net/udp/udp_socket_win.cc (right): https://codereview.chromium.org/861963002/diff/240001/net/udp/udp_socket_win.cc#newcode596 net/udp/udp_socket_win.cc:596: if (recv_from_address_) { nit: no {}
5 years, 10 months ago (2015-02-03 20:55:30 UTC) #22
Alpha Left Google
https://codereview.chromium.org/861963002/diff/240001/net/udp/udp_socket_win.cc File net/udp/udp_socket_win.cc (right): https://codereview.chromium.org/861963002/diff/240001/net/udp/udp_socket_win.cc#newcode264 net/udp/udp_socket_win.cc:264: use_non_blocking_io_(true), On 2015/02/03 03:11:41, rvargas wrote: > false Done. ...
5 years, 10 months ago (2015-02-03 23:24:46 UTC) #23
rvargas (doing something else)
https://codereview.chromium.org/861963002/diff/240001/net/udp/udp_socket_win.cc File net/udp/udp_socket_win.cc (right): https://codereview.chromium.org/861963002/diff/240001/net/udp/udp_socket_win.cc#newcode683 net/udp/udp_socket_win.cc:683: if (read_write_watcher_.GetWatchedObject() != NULL) { On 2015/02/03 23:24:46, Alpha ...
5 years, 10 months ago (2015-02-03 23:54:34 UTC) #24
Alpha Left Google
On 2015/02/03 23:54:34, rvargas wrote: > https://codereview.chromium.org/861963002/diff/240001/net/udp/udp_socket_win.cc > File net/udp/udp_socket_win.cc (right): > > https://codereview.chromium.org/861963002/diff/240001/net/udp/udp_socket_win.cc#newcode683 > ...
5 years, 10 months ago (2015-02-04 00:34:03 UTC) #25
Alpha Left Google
ping.
5 years, 10 months ago (2015-02-04 23:40:41 UTC) #26
Alpha Left Google
Updated by having a DCHECK in UseNonBlockingIO().
5 years, 10 months ago (2015-02-05 00:16:29 UTC) #27
rvargas (doing something else)
lgtm
5 years, 10 months ago (2015-02-05 00:42:20 UTC) #28
rvargas (doing something else)
https://codereview.chromium.org/861963002/diff/300001/net/udp/udp_socket_win.cc File net/udp/udp_socket_win.cc (right): https://codereview.chromium.org/861963002/diff/300001/net/udp/udp_socket_win.cc#newcode683 net/udp/udp_socket_win.cc:683: if (watching_read_write_event_) { BTW, you _could_ change this after ...
5 years, 10 months ago (2015-02-05 00:44:28 UTC) #29
Alpha Left Google
On 2015/02/05 00:44:28, rvargas wrote: > https://codereview.chromium.org/861963002/diff/300001/net/udp/udp_socket_win.cc > File net/udp/udp_socket_win.cc (right): > > https://codereview.chromium.org/861963002/diff/300001/net/udp/udp_socket_win.cc#newcode683 > ...
5 years, 10 months ago (2015-02-05 03:06:30 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/861963002/340001
5 years, 10 months ago (2015-02-05 03:07:32 UTC) #33
commit-bot: I haz the power
Committed patchset #17 (id:340001)
5 years, 10 months ago (2015-02-05 04:18:53 UTC) #34
commit-bot: I haz the power
5 years, 10 months ago (2015-02-05 04:19:35 UTC) #35
Message was sent while issue was closed.
Patchset 17 (id:??) landed as
https://crrev.com/5a5ee680f9fc9647e3b7228d181fc7e2bb7ddecf
Cr-Commit-Position: refs/heads/master@{#314752}

Powered by Google App Engine
This is Rietveld 408576698