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

Issue 8608044: code review 8608044: net: separate pollster initialization from network file descriptor allocation (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years ago by mikio
Modified:
10 years, 1 month ago
Reviewers:
dvyukov
CC:
dvyukov, brainman, minux1, golang-dev
Visibility:
Public.

Description

net: separate pollster initialization from network file descriptor allocation Unlike the existing net package own pollster, runtime-integrated network pollster on BSD variants, actually kqueue, requires a socket that has beed passed to syscall.Listen previously for a stream listener. This CL separates pollDesc.Init (actually runtime_pollOpen) from newFD to allow control of each state of sockets and adds init method to netFD instead. Upcoming CLs will rearrange the call order of runtime-integrated pollster and syscall functions like the following; - For dialers that open active connections, runtime_pollOpen will be called in between syscall.Bind and syscall.Connect. - For stream listeners that open passive stream connections, runtime_pollOpen will be called just after syscall.Listen. - For datagram listeners that open datagram connections, runtime_pollOpen will be called just after syscall.Bind. This is in preparation for runtime-integrated network pollster for BSD variants. Update issue 5199

Patch Set 1 : diff -r d99e8966136e https://code.google.com/p/go #

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

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

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

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

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -18 lines) Patch
M src/pkg/net/fd_poll_runtime.go View 1 2 3 4 2 chunks +7 lines, -0 lines 0 comments Download
M src/pkg/net/fd_unix.go View 1 2 3 2 chunks +12 lines, -10 lines 0 comments Download
M src/pkg/net/fd_windows.go View 1 2 3 4 5 3 chunks +10 lines, -8 lines 0 comments Download
M src/pkg/net/file_unix.go View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M src/pkg/net/sock_posix.go View 1 2 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 23
bradfitz
What's the status of this?
10 years, 10 months ago (2013-06-05 21:04:42 UTC) #1
mikio
On Thu, Jun 6, 2013 at 6:04 AM, <bradfitz@golang.org> wrote: > What's the status of ...
10 years, 10 months ago (2013-06-05 21:36:34 UTC) #2
iant
R=dvyukov
10 years, 10 months ago (2013-06-20 16:33:47 UTC) #3
dvyukov
Is it ready for review? It seems to be not mailed.
10 years, 10 months ago (2013-06-22 15:51:11 UTC) #4
dvyukov
On 2013/06/22 15:51:11, dvyukov wrote: > Is it ready for review? It seems to be ...
10 years, 10 months ago (2013-06-24 11:18:15 UTC) #5
dvyukov
Is this still necessary? I thought that bsd will reuse darwin code, which does not ...
10 years, 9 months ago (2013-08-01 12:33:45 UTC) #6
mikio
On Thu, Aug 1, 2013 at 9:33 PM, <dvyukov@google.com> wrote: > Is this still necessary? ...
10 years, 9 months ago (2013-08-01 13:05:41 UTC) #7
dvyukov
On 2013/08/01 13:05:41, mikio wrote: > On Thu, Aug 1, 2013 at 9:33 PM, <mailto:dvyukov@google.com> ...
10 years, 9 months ago (2013-08-01 13:11:27 UTC) #8
mikio
On Thu, Aug 1, 2013 at 10:11 PM, <dvyukov@google.com> wrote: > I don't know what ...
10 years, 9 months ago (2013-08-01 13:22:44 UTC) #9
dvyukov
I would expect to just get an edge-triggered read notification per each new incoming connection. ...
10 years, 9 months ago (2013-08-01 13:33:07 UTC) #10
mikio
On Thu, Aug 1, 2013 at 10:32 PM, Dmitry Vyukov <dvyukov@google.com> wrote: > I would ...
10 years, 9 months ago (2013-08-01 23:50:15 UTC) #11
mikio
Hello dvyukov@google.com, alex.brainman@gmail.com, minux.ma@gmail.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
10 years, 8 months ago (2013-08-05 02:07:54 UTC) #12
dvyukov
Does not BSD work w/o this change? The documentation snippet can be interpreted in two ...
10 years, 8 months ago (2013-08-05 08:40:57 UTC) #13
mikio
On Mon, Aug 5, 2013 at 5:40 PM, <dvyukov@google.com> wrote: > Does not BSD work ...
10 years, 8 months ago (2013-08-05 11:47:16 UTC) #14
dvyukov
On Mon, Aug 5, 2013 at 3:47 PM, Mikio Hara <mikioh.mikioh@gmail.com> wrote: > On Mon, ...
10 years, 8 months ago (2013-08-05 11:59:36 UTC) #15
mikio
PTAL
10 years, 8 months ago (2013-08-05 14:19:31 UTC) #16
dvyukov
On 2013/08/05 14:19:31, mikio wrote: > PTAL Looks much better overall. If fd.init() fails, you ...
10 years, 8 months ago (2013-08-05 14:40:47 UTC) #17
mikio
PTAL Thanks. All addressed and changed the CL description. > Also please ensure that fd_poll_unix.go ...
10 years, 8 months ago (2013-08-06 03:29:06 UTC) #18
mikio
And Evict, sidekick of Close. On 2013/08/06 03:29:06, mikio wrote: > PTAL > > Thanks. ...
10 years, 8 months ago (2013-08-06 06:32:57 UTC) #19
brainman
Perhaps I am missing something here, but why (*netFD).init cannot be part of newFD? Alex
10 years, 8 months ago (2013-08-06 06:56:58 UTC) #20
dvyukov
On 2013/08/06 06:56:58, brainman wrote: > Perhaps I am missing something here, but why (*netFD).init ...
10 years, 8 months ago (2013-08-06 09:03:42 UTC) #21
dvyukov
LGTM
10 years, 8 months ago (2013-08-06 09:04:21 UTC) #22
mikio
10 years, 8 months ago (2013-08-06 14:42:41 UTC) #23
*** Submitted as https://code.google.com/p/go/source/detail?r=43e7b87397b6 ***

net: separate pollster initialization from network file descriptor allocation

Unlike the existing net package own pollster, runtime-integrated
network pollster on BSD variants, actually kqueue, requires a socket
that has beed passed to syscall.Listen previously for a stream
listener.

This CL separates pollDesc.Init (actually runtime_pollOpen) from newFD
to allow control of each state of sockets and adds init method to netFD
instead. Upcoming CLs will rearrange the call order of runtime-integrated
pollster and syscall functions like the following;

- For dialers that open active connections, runtime_pollOpen will be
  called in between syscall.Bind and syscall.Connect.

- For stream listeners that open passive stream connections,
  runtime_pollOpen will be called just after syscall.Listen.

- For datagram listeners that open datagram connections,
  runtime_pollOpen will be called just after syscall.Bind.

This is in preparation for runtime-integrated network pollster for BSD
variants.

Update issue 5199

R=dvyukov, alex.brainman, minux.ma
CC=golang-dev
https://codereview.appspot.com/8608044
Sign in to reply to this message.

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