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

Issue 12476043: code review 12476043: net: use F_DUPFD_CLOEXEC when duping fds (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 7 months ago by bradfitz
Modified:
11 years, 7 months ago
Reviewers:
dave, iant
CC:
golang-dev, iant
Visibility:
Public.

Description

net: use F_DUPFD_CLOEXEC when duping fds This means that in the common case (modern kernel), we only make 1 system call to dup instead of two, and we also avoid grabbing the syscall.ForkLock.

Patch Set 1 #

Patch Set 2 : diff -r ffe930a195f4 https://go.googlecode.com/hg/ #

Total comments: 2

Patch Set 3 : diff -r ffe930a195f4 https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r ffe930a195f4 https://go.googlecode.com/hg/ #

Patch Set 5 : diff -r ffe930a195f4 https://go.googlecode.com/hg/ #

Patch Set 6 : diff -r 58c839988402 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -9 lines) Patch
M src/pkg/net/fd_unix.go View 1 2 3 4 5 2 chunks +36 lines, -4 lines 0 comments Download
M src/pkg/net/file_unix.go View 1 1 chunk +2 lines, -5 lines 0 comments Download
M src/pkg/syscall/zerrors_freebsd_386.go View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M src/pkg/syscall/zerrors_freebsd_amd64.go View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 9
bradfitz
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
11 years, 7 months ago (2013-08-05 20:16:22 UTC) #1
iant
https://codereview.appspot.com/12476043/diff/3001/src/pkg/net/fd_linux.go File src/pkg/net/fd_linux.go (right): https://codereview.appspot.com/12476043/diff/3001/src/pkg/net/fd_linux.go#newcode1 src/pkg/net/fd_linux.go:1: // Copyright 2013 The Go Authors. All rights reserved. ...
11 years, 7 months ago (2013-08-05 20:40:55 UTC) #2
bradfitz
Hello golang-dev@googlegroups.com, iant@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 7 months ago (2013-08-05 21:41:49 UTC) #3
bradfitz
PTAL Oh, nice. Done. On Mon, Aug 5, 2013 at 1:40 PM, <iant@golang.org> wrote: > ...
11 years, 7 months ago (2013-08-05 21:42:02 UTC) #4
bradfitz
Hello golang-dev@googlegroups.com, iant@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 7 months ago (2013-08-05 22:00:24 UTC) #5
iant
LGTM
11 years, 7 months ago (2013-08-05 22:39:34 UTC) #6
bradfitz
*** Submitted as https://code.google.com/p/go/source/detail?r=4b59ea60560f *** net: use F_DUPFD_CLOEXEC when duping fds This means that in ...
11 years, 7 months ago (2013-08-05 22:43:48 UTC) #7
dave_cheney.net
On 2013/08/05 22:43:48, bradfitz wrote: > *** Submitted as https://code.google.com/p/go/source/detail?r=4b59ea60560f *** > > net: use ...
11 years, 7 months ago (2013-08-06 00:17:37 UTC) #8
bradfitz
11 years, 7 months ago (2013-08-06 00:18:36 UTC) #9
On Mon, Aug 5, 2013 at 5:17 PM, <dave@cheney.net> wrote:

> On 2013/08/05 22:43:48, bradfitz wrote:
>
>> *** Submitted as
>>
>
https://code.google.com/p/go/**source/detail?r=4b59ea60560f<https://code.goog...
>
>  net: use F_DUPFD_CLOEXEC when duping fds
>>
>
>  This means that in the common case (modern kernel), we only
>> make 1 system call to dup instead of two, and we also avoid
>> grabbing the syscall.ForkLock.
>>
>
>  R=golang-dev, iant
>> CC=golang-dev
>>
https://codereview.appspot.**com/12476043<https://codereview.appspot.com/1247...
>>
>
> Bad news. This broken OS X 10.6.
>
http://build.golang.org/log/**4189569958ff4bea7543f302ad35e1**420ede69ee<http...
> .
> Maybe there is a bug with the fallback logic.
>

I discovered that 14 minutes ago and sent out a CL which you could LGTM.
 :-)
Sign in to reply to this message.

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