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

Issue 6845119: code review 6845119: net: remove unnecessary Close contention. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 8 months ago by remyoudompheng
Modified:
12 years, 8 months ago
Reviewers:
CC:
golang-dev, dave_cheney.net, mikio
Visibility:
Public.

Description

net: remove unnecessary Close contention. Contention profile in BenchmarkTCPOneShot (Core 2 Quad): Before Total: 80.285 seconds 44.743 55.7% 55.7% 44.743 55.7% runtime.chanrecv1 31.995 39.9% 95.6% 31.995 39.9% sync.(*Mutex).Lock 3.547 4.4% 100.0% 3.547 4.4% runtime.chansend1 After Total: 48.341 seconds 45.810 94.8% 94.8% 45.810 94.8% runtime.chanrecv1 2.530 5.2% 100.0% 2.530 5.2% runtime.chansend1 0.001 0.0% 100.0% 0.001 0.0% sync.(*Mutex).Lock

Patch Set 1 #

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

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

Total comments: 4

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

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -2 lines) Patch
M src/pkg/net/fd_unix.go View 1 2 chunks +2 lines, -1 line 0 comments Download
M src/pkg/net/sock_posix.go View 1 1 chunk +0 lines, -1 line 1 comment Download

Messages

Total messages: 9
remyoudompheng
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
12 years, 8 months ago (2012-11-30 20:08:32 UTC) #1
dave_cheney.net
Can you post the before and after svg's ? https://codereview.appspot.com/6845119/diff/5001/src/pkg/net/fd_unix.go File src/pkg/net/fd_unix.go (right): https://codereview.appspot.com/6845119/diff/5001/src/pkg/net/fd_unix.go#newcode379 src/pkg/net/fd_unix.go:379: ...
12 years, 8 months ago (2012-11-30 20:13:41 UTC) #2
remyoudompheng
https://codereview.appspot.com/6845119/diff/5001/src/pkg/net/fd_unix.go File src/pkg/net/fd_unix.go (right): https://codereview.appspot.com/6845119/diff/5001/src/pkg/net/fd_unix.go#newcode379 src/pkg/net/fd_unix.go:379: fd.pollServer.Unlock() On 2012/11/30 20:13:41, dfc wrote: > This looks ...
12 years, 8 months ago (2012-11-30 20:57:36 UTC) #3
remyoudompheng
On 2012/11/30 20:57:36, remyoudompheng wrote: > https://codereview.appspot.com/6845119/diff/5001/src/pkg/net/fd_unix.go > File src/pkg/net/fd_unix.go (right): > > https://codereview.appspot.com/6845119/diff/5001/src/pkg/net/fd_unix.go#newcode379 > ...
12 years, 8 months ago (2012-11-30 21:05:54 UTC) #4
dave_cheney.net
LGTM. https://codereview.appspot.com/6845119/diff/5001/src/pkg/net/fd_unix.go File src/pkg/net/fd_unix.go (right): https://codereview.appspot.com/6845119/diff/5001/src/pkg/net/fd_unix.go#newcode377 src/pkg/net/fd_unix.go:377: fd.pollServer.Lock() // needed for both fd.incref(true) and pollserver.Evict ...
12 years, 8 months ago (2012-11-30 21:07:08 UTC) #5
mikio
https://codereview.appspot.com/6845119/diff/5001/src/pkg/net/sock_posix.go File src/pkg/net/sock_posix.go (right): https://codereview.appspot.com/6845119/diff/5001/src/pkg/net/sock_posix.go#newcode63 src/pkg/net/sock_posix.go:63: closesocket(s) probably I'm missing something but I wonder how ...
12 years, 8 months ago (2012-12-01 03:48:18 UTC) #6
mikio
LGTM On 2012/12/01 03:48:18, mikio wrote: > probably I'm missing something but I wonder how ...
12 years, 8 months ago (2012-12-01 04:12:50 UTC) #7
remyoudompheng
*** Submitted as https://code.google.com/p/go/source/detail?r=6ec24fe2e501 *** net: remove unnecessary Close contention. Contention profile in BenchmarkTCPOneShot (Core ...
12 years, 8 months ago (2012-12-01 08:26:37 UTC) #8
remyoudompheng
12 years, 8 months ago (2012-12-01 09:25:38 UTC) #9
Message was sent while issue was closed.
https://codereview.appspot.com/6845119/diff/7003/src/pkg/net/sock_posix.go
File src/pkg/net/sock_posix.go (left):

https://codereview.appspot.com/6845119/diff/7003/src/pkg/net/sock_posix.go#ol...
src/pkg/net/sock_posix.go:64: fd.Close()
This patch of the patch may break windows in mysterious ways because netFD has a
finalizer on Widnows whereas it hasn't on Unix.
Do you confirm?
Sign in to reply to this message.

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