Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(15097)

Issue 6850110: code review 6850110: net: move deadline logic into pollServer (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 4 months ago by dfc
Modified:
11 years, 4 months ago
Reviewers:
CC:
jsing, bradfitz, mikio, rsc, albert.strasheim, golang-dev
Visibility:
Public.

Description

net: move deadline logic into pollServer Update issue 4434. The proposal attempts to reduce the number of places where fd,{r,w}deadline is checked and updated in preparation for issue 4434. In doing so the deadline logic is simplified by letting the pollster return errTimeout from netFD.Wait{Read,Write} as part of the wakeup logic. The behaviour of setting n = 0 has been restored to match rev 2a55e349097f, which was the previous change to fd_unix.go before CL 6851096.

Patch Set 1 #

Patch Set 2 : diff -r fc24aee70702 https://code.google.com/p/go #

Patch Set 3 : diff -r fc24aee70702 https://code.google.com/p/go #

Patch Set 4 : diff -r fc24aee70702 https://code.google.com/p/go #

Patch Set 5 : diff -r fc24aee70702 https://code.google.com/p/go #

Patch Set 6 : diff -r fc24aee70702 https://code.google.com/p/go #

Patch Set 7 : diff -r fc24aee70702 https://code.google.com/p/go #

Total comments: 8

Patch Set 8 : diff -r 34e54cf71fed https://go.googlecode.com/hg/ #

Total comments: 6

Patch Set 9 : diff -r 9049dd504139 https://go.googlecode.com/hg/ #

Total comments: 6

Patch Set 10 : diff -r 2788bd8b6b7f https://go.googlecode.com/hg/ #

Patch Set 11 : diff -r 78c21e036353 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+73 lines, -49 lines) Patch
M src/pkg/net/fd_unix.go View 1 2 3 4 5 6 7 8 9 9 chunks +26 lines, -49 lines 0 comments Download
M src/pkg/net/fd_unix_test.go View 1 2 3 4 5 6 7 8 9 2 chunks +47 lines, -0 lines 0 comments Download

Messages

Total messages: 15
dfc
Hello jsing@google.com, bradfitz@golang.org, mikioh.mikioh@gmail.com, rsc@golang.org (cc: fullung@gmail.com, golang-dev@googlegroups.com), I'd like you to review this change ...
11 years, 4 months ago (2012-11-27 09:18:24 UTC) #1
bradfitz
So far looking nice, and simpler. You going to do the rest in this same ...
11 years, 4 months ago (2012-11-27 09:42:07 UTC) #2
dfc
I would like to do this as two separate CLs. I'd also like to get ...
11 years, 4 months ago (2012-11-27 09:52:29 UTC) #3
mikio
It passes on openbsd, yay. https://codereview.appspot.com/6850110/diff/6003/src/pkg/net/fd_unix.go File src/pkg/net/fd_unix.go (right): https://codereview.appspot.com/6850110/diff/6003/src/pkg/net/fd_unix.go#newcode435 src/pkg/net/fd_unix.go:435: if n == 0 ...
11 years, 4 months ago (2012-11-27 12:34:36 UTC) #4
dfc
Thank you for your comments. I am encouraged to hear OpenBSD is passing. PTAL. https://codereview.appspot.com/6850110/diff/6003/src/pkg/net/fd_unix.go ...
11 years, 4 months ago (2012-11-27 12:48:58 UTC) #5
rsc
LGTM https://codereview.appspot.com/6850110/diff/11002/src/pkg/net/fd_unix.go File src/pkg/net/fd_unix.go (right): https://codereview.appspot.com/6850110/diff/11002/src/pkg/net/fd_unix.go#newcode435 src/pkg/net/fd_unix.go:435: if n == 0 && err == nil ...
11 years, 4 months ago (2012-11-27 15:26:58 UTC) #6
jsing
LGTM. This is the less intrusive change, although more expensive in terms of consecutive calls ...
11 years, 4 months ago (2012-11-27 16:01:55 UTC) #7
mikio
LGTM On Wed, Nov 28, 2012 at 12:26 AM, <rsc@golang.org> wrote: > https://codereview.appspot.com/6850110/diff/11002/src/pkg/net/fd_unix.go#newcode435 > src/pkg/net/fd_unix.go:435: ...
11 years, 4 months ago (2012-11-27 21:23:18 UTC) #8
dfc
PTAL. I'm leaving this code to stress test for a few hours, then will submit ...
11 years, 4 months ago (2012-11-27 21:35:16 UTC) #9
mikio
nits https://codereview.appspot.com/6850110/diff/2005/src/pkg/net/fd_unix.go File src/pkg/net/fd_unix.go (right): https://codereview.appspot.com/6850110/diff/2005/src/pkg/net/fd_unix.go#newcode435 src/pkg/net/fd_unix.go:435: if n == 0 && err == nil ...
11 years, 4 months ago (2012-11-27 21:42:59 UTC) #10
dfc
Hopefully this is the final tweak. As the logic of that check was getting large, ...
11 years, 4 months ago (2012-11-27 23:48:43 UTC) #11
mikio
On Wed, Nov 28, 2012 at 8:48 AM, <dave@cheney.net> wrote: > Hopefully this is the ...
11 years, 4 months ago (2012-11-28 00:06:55 UTC) #12
bradfitz
LGTM I assume you'll do RecvFrom todo and tests later? On Nov 27, 2012 3:48 ...
11 years, 4 months ago (2012-11-28 00:07:53 UTC) #13
dfc
*** Submitted as http://code.google.com/p/go/source/detail?r=1289e67dec66 *** net: move deadline logic into pollServer Update issue 4434. The ...
11 years, 4 months ago (2012-11-28 00:29:48 UTC) #14
bradfitz
11 years, 4 months ago (2012-11-28 01:22:58 UTC) #15
Okay, time to make deadline updates atomic!

On Tue, Nov 27, 2012 at 4:29 PM, <dave@cheney.net> wrote:

> *** Submitted as
>
http://code.google.com/p/go/**source/detail?r=1289e67dec66<http://code.google...
>
>
> net: move deadline logic into pollServer
>
> Update issue 4434.
>
> The proposal attempts to reduce the number of places where
> fd,{r,w}deadline is checked and updated in preparation for issue 4434.
> In doing so the deadline logic is simplified by letting the pollster
> return errTimeout from netFD.Wait{Read,Write} as part of the wakeup
> logic.
>
> The behaviour of setting n = 0 has been restored to match rev
> 2a55e349097f, which was the previous change to fd_unix.go before CL
> 6851096.
>
> R=jsing, bradfitz, mikioh.mikioh, rsc
> CC=fullung, golang-dev
>
http://codereview.appspot.com/**6850110<http://codereview.appspot.com/6850110>
>
>
>
http://codereview.appspot.com/**6850110/<http://codereview.appspot.com/6850110/>
>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b