An error occurred fetching the project authors.
- 13 Mar, 2019 1 commit
-
-
Mikio Hara authored
This change makes it possible the runtime-integrated network poller and APIs in the package internal/poll to report an event scanning error on a read event. The latest Go releases open up the way of the manipulation of the poller for users. On the other hand, it starts misleading users into believing that the poller accepts any user-configured file or socket perfectly because of not reporting any error on event scanning, as mentioned in issue 30426. The initial implementation of the poller was designed for just well-configured, validated sockets produced by the package net. However, the assumption is now obsolete. Fixes #30624. Benchmark results on linux/amd64: benchmark old ns/op new ns/op delta BenchmarkTCP4OneShot-4 24649 23979 -2.72% BenchmarkTCP4OneShotTimeout-4 25742 24411 -5.17% BenchmarkTCP4Persistent-4 5139 5222 +1.62% BenchmarkTCP4PersistentTimeout-4 4919 4892 -0.55% BenchmarkTCP6OneShot-4 21182 20767 -1.96% BenchmarkTCP6OneShotTimeout-4 23364 22305 -4.53% BenchmarkTCP6Persistent-4 4351 4366 +0.34% BenchmarkTCP6PersistentTimeout-4 4227 4255 +0.66% BenchmarkTCP4ConcurrentReadWrite-4 2309 1839 -20.36% BenchmarkTCP6ConcurrentReadWrite-4 2180 1791 -17.84% benchmark old allocs new allocs delta BenchmarkTCP4OneShot-4 26 26 +0.00% BenchmarkTCP4OneShotTimeout-4 26 26 +0.00% BenchmarkTCP4Persistent-4 0 0 +0.00% BenchmarkTCP4PersistentTimeout-4 0 0 +0.00% BenchmarkTCP6OneShot-4 26 26 +0.00% BenchmarkTCP6OneShotTimeout-4 26 26 +0.00% BenchmarkTCP6Persistent-4 0 0 +0.00% BenchmarkTCP6PersistentTimeout-4 0 0 +0.00% BenchmarkTCP4ConcurrentReadWrite-4 0 0 +0.00% BenchmarkTCP6ConcurrentReadWrite-4 0 0 +0.00% benchmark old bytes new bytes delta BenchmarkTCP4OneShot-4 2000 2000 +0.00% BenchmarkTCP4OneShotTimeout-4 2000 2000 +0.00% BenchmarkTCP4Persistent-4 0 0 +0.00% BenchmarkTCP4PersistentTimeout-4 0 0 +0.00% BenchmarkTCP6OneShot-4 2144 2144 +0.00% BenchmarkTCP6OneShotTimeout-4 2144 2145 +0.05% BenchmarkTCP6Persistent-4 0 0 +0.00% BenchmarkTCP6PersistentTimeout-4 0 0 +0.00% BenchmarkTCP4ConcurrentReadWrite-4 0 0 +0.00% BenchmarkTCP6ConcurrentReadWrite-4 0 0 +0.00% Change-Id: Iab60e504dff5639e688dc5420d852f336508c0af Reviewed-on: https://go-review.googlesource.com/c/go/+/166497 Run-TryBot: Mikio Hara <mikioh.public.networking@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 04 Mar, 2019 1 commit
-
-
Josh Bleecher Snyder authored
Converting a syscall.Errno to an interface is a significant source of allocations in os/exec. Elsewhere in the tree, we have pre-allocated errors for common errno values. Use the same trick here. This CL makes yet another copy of this code. The problem is that there isn't really a great place to share it. The existing copies are in: cmd/vendor/golang.org/x/sys/unix cmd/vendor/golang.org/x/sys/windows cmd/vendor/golang.org/x/sys/windows/registry internal/syscall/windows internal/syscall/windows/registry syscall internal/poll can't import from cmd/vendor, and cmd/vendor can't import from internal/*, so we can ignore cmd/vendor. We could put the unix version in internal/syscall/unix and then have a platform-independent wrapper in internal/syscall. But syscall couldn't use it; internal/syscall/* depends on syscall. So that only allows code re-use with internal/syscall/windows/*. We could create a new very low level internal package, internal/errno. But syscall couldn't use it, because it has to import syscall to get access to syscall.Errno. So that only allows code re-use with internal/syscall/windows/*. It's not clear that that any of these options pulls its weight. The obvious and "correct" place for this is syscall. But we can't export syscall's version, because package syscall is frozen. So just copy the code. There's not much of it. name old alloc/op new alloc/op delta ExecHostname-8 6.15kB ± 0% 6.13kB ± 0% -0.38% (p=0.000 n=20+19) name old allocs/op new allocs/op delta ExecHostname-8 34.0 ± 0% 31.0 ± 0% -8.82% (p=0.000 n=20+20) Fixes #30535 Change-Id: Idd31c7cced6e15387acc698ffc011e1b7b479903 Reviewed-on: https://go-review.googlesource.com/c/164971 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 02 Nov, 2018 4 commits
-
-
Brad Fitzpatrick authored
Go documentation style for boolean funcs is to say: // Foo reports whether ... func Foo() bool (rather than "returns true if") This CL also replaces 4 uses of "iff" with the same "reports whether" wording, which doesn't lose any meaning, and will prevent people from sending typo fixes when they don't realize it's "if and only if". In the past I think we've had the typo CLs updated to just say "reports whether". So do them all at once. (Inspired by the addition of another "returns true if" in CL 146938 in fd_plan9.go) Created with: $ perl -i -npe 's/returns true if/reports whether/' $(git grep -l "returns true iff" | grep -v vendor) $ perl -i -npe 's/returns true if/reports whether/' $(git grep -l "returns true if" | grep -v vendor) Change-Id: Ided502237f5ab0d25cb625dbab12529c361a8b9f Reviewed-on: https://go-review.googlesource.com/c/147037Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Clément Chigot authored
This commit changes poll.PollDescriptor by poll.IsPollDescriptor. This is needed for OS like AIX which have more than one FD using inside their netpoll implementation. Change-Id: I49e12a8d74045c501e19fdd8527cf166a3c64850 Reviewed-on: https://go-review.googlesource.com/c/146938 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Dmitry Vyukov authored
runtimeNano is slower than nanotime, so pass the duration to runtime_pollSetDeadline as is. netpoll can add nanotime itself. Arguably a bit simpler because, say, a negative duration clearly represents already expired timer, no need to compare to nanotime again. This may also fix an obscure corner case when a deadline in past which happens to be nanotime 0 is confused with no deadline at all, which are radically different things. Also don't compute any durations and times if Time is zero (currently we first compute everything and then reset d back to 0, which is wasteful). name old time/op new time/op delta TCP4OneShotTimeout-6 17.1µs ± 0% 17.0µs ± 0% ~ (p=0.421 n=5+5) SetReadDeadline-6 230ns ± 0% 205ns ± 1% -10.63% (p=0.008 n=5+5) Change-Id: I2aad699270289a5b9ead68f5e44ec4ec6d96baa0 Reviewed-on: https://go-review.googlesource.com/c/146344Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Dmitry Vyukov <dvyukov@google.com>
-
Dmitry Vyukov authored
The nanotime wrappers in runtime introduce a bunch of unnecessary code onto hot paths, e.g.: 0000000000449d70 <time.runtimeNano>: 449d70: 64 48 8b 0c 25 f8 ff mov %fs:0xfffffffffffffff8,%rcx 449d77: ff ff 449d79: 48 3b 61 10 cmp 0x10(%rcx),%rsp 449d7d: 76 26 jbe 449da5 <time.runtimeNano+0x35> 449d7f: 48 83 ec 10 sub $0x10,%rsp 449d83: 48 89 6c 24 08 mov %rbp,0x8(%rsp) 449d88: 48 8d 6c 24 08 lea 0x8(%rsp),%rbp 449d8d: e8 ae 18 01 00 callq 45b640 <runtime.nanotime> 449d92: 48 8b 04 24 mov (%rsp),%rax 449d96: 48 89 44 24 18 mov %rax,0x18(%rsp) 449d9b: 48 8b 6c 24 08 mov 0x8(%rsp),%rbp 449da0: 48 83 c4 10 add $0x10,%rsp 449da4: c3 retq 449da5: e8 56 e0 00 00 callq 457e00 <runtime.morestack_noctxt> 449daa: eb c4 jmp 449d70 <time.runtimeNano> Move them to the corresponding packages which eliminates all of this. name old time/op new time/op delta TCP4OneShotTimeout-6 17.1µs ± 1% 17.0µs ± 0% -0.66% (p=0.032 n=5+5) SetReadDeadline-6 234ns ± 1% 232ns ± 0% -0.77% (p=0.016 n=5+4) Update #25729 Change-Id: Iee05027adcdc289ba895c5f5a37f154e451bc862 Reviewed-on: https://go-review.googlesource.com/c/146342 Run-TryBot: Dmitry Vyukov <dvyukov@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 03 Oct, 2018 1 commit
-
-
Clément Chigot authored
This commit adds AIX operating system to internal/poll package for ppc64 architecture. Updates: #25893 Change-Id: I9b1da9255012de58f16547c1b18f8840485da170 Reviewed-on: https://go-review.googlesource.com/c/138717 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 25 Oct, 2017 1 commit
-
-
Ian Lance Taylor authored
Add SetDeadline, SetReadDeadline, and SetWriteDeadline methods to os.File, just as they exist today for the net package. Fixes #22114 Change-Id: I4d390d739169b991175baba676010897dc8568fa Reviewed-on: https://go-review.googlesource.com/71770 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org> Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
-
- 19 Oct, 2017 1 commit
-
-
Ian Lance Taylor authored
No test because at present it is never called in a way that fails. When #22114 is implemented, failure will be possible. Not including this change in that work because this change is separable and clearly correct. Updates #22114 Change-Id: I81eb9eec8800e8082d918c0e5fb71282f538267e Reviewed-on: https://go-review.googlesource.com/71751 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Joe Tsai <joetsai@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 14 Jul, 2017 1 commit
-
-
Ian Lance Taylor authored
If we get an EAGAIN error on an unpollable file, don't try to wait for it to be ready; just return EAGAIN. It's possible that we should instead ensure that when Stdin is a pipe in non-blocking mode, we wait for data to appear. For now take the conservative approach of doing what we did in previous releases. Based on https://golang.org/cl/47555 by Totoro W. Fixes #20915 Change-Id: Icc9e97a5a877b0a3583ec056c35412d1afab62d1 Reviewed-on: https://go-review.googlesource.com/48490 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 26 Apr, 2017 1 commit
-
-
Ian Lance Taylor authored
In the past we returned "use of closed network connection" when using a closed network descriptor in some way. In CL 36799 that was changed to return "use of closed file or network connection". Because programs have no access to a value of this error type (see issue #4373) they resort to doing direct string comparisons (see issue #19252). This CL restores the old error string so that we don't break programs unnecessarily with the 1.9 release. This adds a test to the net package for the expected string. For symmetry check that the os package returns the expected error, which for os already exists as os.ErrClosed. Updates #4373. Fixed #19252. Change-Id: I5b83fd12cfa03501a077cad9336499b819f4a38b Reviewed-on: https://go-review.googlesource.com/39997 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
- 07 Mar, 2017 1 commit
-
-
Mikio Hara authored
This change adds missing docs, collapses single-line import paths, removes unsed method placeholders and renames str.go to strconv.go. Change-Id: I2d155c838935cd8427abd142a462ff4c56829703 Reviewed-on: https://go-review.googlesource.com/37814 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 15 Feb, 2017 2 commits
-
-
Ian Lance Taylor authored
This changes the os package to use the runtime poller for file I/O where possible. When a system call blocks on a pollable descriptor, the goroutine will be blocked on the poller but the thread will be released to run other goroutines. When using a non-pollable descriptor, the os package will continue to use thread-blocking system calls as before. For example, on GNU/Linux, the runtime poller uses epoll. epoll does not support ordinary disk files, so they will continue to use blocking I/O as before. The poller will be used for pipes. Since this means that the poller is used for many more programs, this modifies the runtime to only block waiting for the poller if there is some goroutine that is waiting on the poller. Otherwise, there is no point, as the poller will never make any goroutine ready. This preserves the runtime's current simple deadlock detection. This seems to crash FreeBSD systems, so it is disabled on FreeBSD. This is issue 19093. Using the poller on Windows requires opening the file with FILE_FLAG_OVERLAPPED. We should only do that if we can remove that flag if the program calls the Fd method. This is issue 19098. Update #6817. Update #7903. Update #15021. Update #18507. Update #19093. Update #19098. Change-Id: Ia5197dcefa7c6fbcca97d19a6f8621b2abcbb1fe Reviewed-on: https://go-review.googlesource.com/36800 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
Dave Cheney authored
Change-Id: Ic2b20c8238ff0ca5513d32e54ef2945fa4d0c3d2 Reviewed-on: https://go-review.googlesource.com/37033 Run-TryBot: Dave Cheney <dave@cheney.net> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 13 Feb, 2017 1 commit
-
-
Ian Lance Taylor authored
This will make it possible to use the poller with the os package. This is a lot of code movement but the behavior is intended to be unchanged. Update #6817. Update #7903. Update #15021. Update #18507. Change-Id: I1413685928017c32df5654ded73a2643820977ae Reviewed-on: https://go-review.googlesource.com/36799 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
- 30 Aug, 2016 1 commit
-
-
Brad Fitzpatrick authored
Updates #14595 Change-Id: Idf60b3004c7a0ebb59dd48389ab62c854069e09f Reviewed-on: https://go-review.googlesource.com/28073 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 24 Aug, 2016 1 commit
-
-
Ian Lance Taylor authored
The net package sets a finalizer on *netFD. I looked through all the uses of *netFD in the package, looking for each case where a *netFD was passed as an argument and the final reference to the argument was not a function or method call. I added a call to runtime.KeepAlive after each such final reference (there were only three). The code is safe today without the KeepAlive calls because the compiler keeps arguments alive for the duration of the function. However, that is not a language requirement, so adding the KeepAlive calls ensures that this code remains safe even if the compiler changes in the future. Change-Id: I4e2bd7c5a946035dc509ccefb4828f72335a9ee3 Reviewed-on: https://go-review.googlesource.com/27650 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 17 Mar, 2016 1 commit
-
-
Mikio Hara authored
This change makes unexposed methods start with lowercase letters for avoiding unnecessary confusion because the net package uses many embedding structures and intrefaces for controlling exposure of APIs. Note that this change leaves DNS-related methods as they are. Change-Id: I253758d1659175c5d0af6b2efcd30ce83f46543d Reviewed-on: https://go-review.googlesource.com/20784 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 23 Feb, 2016 1 commit
-
-
Prashant Varanasi authored
The existing implementation converts the deadline time to an int64, but does not handle overflow. If the calculated deadline is negative but the user specified deadline is in the future, then we can assume the calculation overflowed, and set the deadline to math.MaxInt64. Fixes #14431 Change-Id: I54dbb4f02bc7ffb9cae8cf62e4e967e9c6541ec6 Reviewed-on: https://go-review.googlesource.com/19758Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
-
- 04 Feb, 2015 1 commit
-
-
Mikio Hara authored
We don't need placeholders for the old built-in poll server any more. Change-Id: I3a510aec6a30bc2ac97676c400177cdfe557b8dc Reviewed-on: https://go-review.googlesource.com/3863Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
-
- 08 Sep, 2014 1 commit
-
-
Russ Cox authored
Preparation was in CL 134570043. This CL contains only the effect of 'hg mv src/pkg/* src'. For more about the move, see golang.org/s/go14nopkg.
-
- 25 Feb, 2014 1 commit
-
-
Aram Hăvărneanu authored
LGTM=dave, rsc R=golang-codereviews, minux.ma, mikioh.mikioh, dave, iant, rsc CC=golang-codereviews https://golang.org/cl/36030043
-
- 24 Feb, 2014 1 commit
-
-
Jay Weisskopf authored
This lays the groundwork for making Go robust when the system's calendar time jumps around. All input values to the runtimeTimer struct now use the runtime clock as a common reference point. This affects net.Conn.Set[Read|Write]Deadline(), time.Sleep(), time.Timer, etc. Under normal conditions, behavior is unchanged. Each platform and architecture's implementation of runtime·nanotime() should be modified to use a monotonic system clock when possible. Platforms/architectures modified and tested with monotonic clock: linux/x86 - clock_gettime(CLOCK_MONOTONIC) Update #6007 LGTM=dvyukov, rsc R=golang-codereviews, dvyukov, alex.brainman, stephen.gutekanst, dave, rsc, mikioh.mikioh CC=golang-codereviews https://golang.org/cl/53010043
-
- 23 Aug, 2013 1 commit
-
-
Joel Sing authored
Make the net package build and work on dragonfly. R=bradfitz CC=golang-dev https://golang.org/cl/13173044
-
- 20 Aug, 2013 1 commit
-
-
Mikio Hara authored
Fixes #6146. R=golang-dev, r CC=golang-dev https://golang.org/cl/12927048
-
- 17 Aug, 2013 1 commit
-
-
Mikio Hara authored
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/13080043
-
- 15 Aug, 2013 1 commit
-
-
Mikio Hara authored
Fixes #5199. Benchmark results on freebsd/amd64 (virtual machine): benchmark old ns/op new ns/op delta BenchmarkTCP4OneShot-2 184566 187164 +1.41% BenchmarkTCP4OneShotTimeout-2 215558 187722 -12.91% BenchmarkTCP4Persistent-2 59686 41294 -30.81% BenchmarkTCP4PersistentTimeout-2 60692 39974 -34.14% BenchmarkTCP6OneShot-2 226595 223688 -1.28% BenchmarkTCP6OneShotTimeout-2 253144 225161 -11.05% BenchmarkTCP6Persistent-2 69157 55605 -19.60% BenchmarkTCP6PersistentTimeout-2 70426 53805 -23.60% BenchmarkTCP4ConcurrentReadWrite-2 53878 56087 +4.10% BenchmarkTCP6ConcurrentReadWrite-2 66538 68190 +2.48% benchmark old allocs new allocs delta BenchmarkTCP4OneShot-2 39 36 -7.69% BenchmarkTCP4OneShotTimeout-2 42 36 -14.29% BenchmarkTCP4Persistent-2 1 0 -100.00% BenchmarkTCP4PersistentTimeout-2 1 0 -100.00% BenchmarkTCP6OneShot-2 41 36 -12.20% BenchmarkTCP6OneShotTimeout-2 43 36 -16.28% BenchmarkTCP6Persistent-2 1 0 -100.00% BenchmarkTCP6PersistentTimeout-2 1 0 -100.00% BenchmarkTCP4ConcurrentReadWrite-2 0 0 n/a% BenchmarkTCP6ConcurrentReadWrite-2 0 0 n/a% benchmark old bytes new bytes delta BenchmarkTCP4OneShot-2 3084 2544 -17.51% BenchmarkTCP4OneShotTimeout-2 3129 2519 -19.50% BenchmarkTCP4Persistent-2 30 0 -100.00% BenchmarkTCP4PersistentTimeout-2 31 0 -100.00% BenchmarkTCP6OneShot-2 3297 2660 -19.32% BenchmarkTCP6OneShotTimeout-2 3306 2655 -19.69% BenchmarkTCP6Persistent-2 31 0 -100.00% BenchmarkTCP6PersistentTimeout-2 29 0 -100.00% BenchmarkTCP4ConcurrentReadWrite-2 2 0 -100.00% BenchmarkTCP6ConcurrentReadWrite-2 7 0 -100.00% R=dvyukov, minux.ma, dave, bradfitz, alex.brainman CC=golang-dev https://golang.org/cl/8264043
-
- 13 Aug, 2013 1 commit
-
-
Mikio Hara authored
Just for readability reasons; to prevent overlooking deadline stuff across over platforms. R=golang-dev, dvyukov CC=golang-dev https://golang.org/cl/8656044
-
- 09 Aug, 2013 1 commit
-
-
Dmitriy Vyukov authored
The mutex, fdMutex, handles locking and lifetime of sysfd, and serializes Read and Write methods. This allows to strip 2 sync.Mutex.Lock calls, 2 sync.Mutex.Unlock calls, 1 defer and some amount of misc overhead from every network operation. On linux/amd64, Intel E5-2690: benchmark old ns/op new ns/op delta BenchmarkTCP4Persistent 9595 9454 -1.47% BenchmarkTCP4Persistent-2 8978 8772 -2.29% BenchmarkTCP4ConcurrentReadWrite 4900 4625 -5.61% BenchmarkTCP4ConcurrentReadWrite-2 2603 2500 -3.96% In general it strips 70-500 ns from every network operation depending on processor model. On my relatively new E5-2690 it accounts to ~5% of network op cost. Fixes #6074. R=golang-dev, bradfitz, alex.brainman, iant, mikioh.mikioh CC=golang-dev https://golang.org/cl/12418043
-
- 06 Aug, 2013 1 commit
-
-
Mikio Hara authored
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 #5199 R=dvyukov, alex.brainman, minux.ma CC=golang-dev https://golang.org/cl/8608044
-
- 22 Jul, 2013 1 commit
-
-
Alex Brainman authored
Moves the network poller from net package into runtime. benchmark old ns/op new ns/op delta BenchmarkTCP4OneShot 316386 287061 -9.27% BenchmarkTCP4OneShot-2 339822 313424 -7.77% BenchmarkTCP4OneShot-3 330057 306589 -7.11% BenchmarkTCP4OneShotTimeout 341775 287061 -16.01% BenchmarkTCP4OneShotTimeout-2 380835 295849 -22.32% BenchmarkTCP4OneShotTimeout-3 398412 328070 -17.66% BenchmarkTCP4Persistent 40622 33392 -17.80% BenchmarkTCP4Persistent-2 44528 35736 -19.74% BenchmarkTCP4Persistent-3 44919 36907 -17.84% BenchmarkTCP4PersistentTimeout 45309 33588 -25.87% BenchmarkTCP4PersistentTimeout-2 50289 38079 -24.28% BenchmarkTCP4PersistentTimeout-3 51559 37103 -28.04% BenchmarkTCP6OneShot 361305 345645 -4.33% BenchmarkTCP6OneShot-2 361305 331976 -8.12% BenchmarkTCP6OneShot-3 376929 347598 -7.78% BenchmarkTCP6OneShotTimeout 361305 322212 -10.82% BenchmarkTCP6OneShotTimeout-2 378882 333928 -11.86% BenchmarkTCP6OneShotTimeout-3 388647 335881 -13.58% BenchmarkTCP6Persistent 47653 35345 -25.83% BenchmarkTCP6Persistent-2 49215 35736 -27.39% BenchmarkTCP6Persistent-3 38474 37493 -2.55% BenchmarkTCP6PersistentTimeout 56637 34369 -39.32% BenchmarkTCP6PersistentTimeout-2 42575 38079 -10.56% BenchmarkTCP6PersistentTimeout-3 44137 37689 -14.61% R=dvyukov CC=golang-dev https://golang.org/cl/8670044
-
- 25 Jun, 2013 1 commit
-
-
Alex Brainman authored
- change runtime_pollWait so it does not return closed or timeout if IO is ready - windows must know if IO has completed or not even after interruption; - add (*pollDesc).Prepare(mode int) that can be used for both read and write, same for Wait; - introduce runtime_pollWaitCanceled and expose it in net as (*pollDesc).WaitCanceled(mode int); Full windows netpoll changes are here https://golang.org/cl/8670044/. R=golang-dev, dvyukov CC=golang-dev https://golang.org/cl/10485043
-
- 20 May, 2013 2 commits
-
-
Alex Brainman authored
R=golang-dev, bradfitz CC=dvyukov, golang-dev, mikioh.mikioh https://golang.org/cl/9495044
-
Alex Brainman authored
This is in preparation for netpoll windows version. R=golang-dev, bradfitz CC=dvyukov, golang-dev, mikioh.mikioh https://golang.org/cl/9569043
-
- 15 Mar, 2013 1 commit
-
-
Shenghou Ma authored
Results from linux/arm on a Samsung Chromebook (from dfc): localhost(~/go/src/pkg/net) % ~/go/misc/benchcmp {old,new}.txt benchmark old ns/op new ns/op delta BenchmarkTCP4OneShot 568840 350526 -38.38% BenchmarkTCP4OneShot-2 359054 206708 -42.43% BenchmarkTCP4OneShotTimeout 637464 363550 -42.97% BenchmarkTCP4OneShotTimeout-2 374255 216695 -42.10% BenchmarkTCP4Persistent 184974 64984 -64.87% BenchmarkTCP4Persistent-2 109902 47195 -57.06% BenchmarkTCP4PersistentTimeout 210039 64789 -69.15% BenchmarkTCP4PersistentTimeout-2 124284 43374 -65.10% BenchmarkTCP6OneShot 672278 362116 -46.14% BenchmarkTCP6OneShot-2 383631 216400 -43.59% BenchmarkTCP6OneShotTimeout 680740 378306 -44.43% BenchmarkTCP6OneShotTimeout-2 397524 230152 -42.10% BenchmarkTCP6Persistent 172346 65292 -62.12% BenchmarkTCP6Persistent-2 106229 42096 -60.37% BenchmarkTCP6PersistentTimeout 161149 65138 -59.58% BenchmarkTCP6PersistentTimeout-2 152276 44548 -70.75% R=golang-dev, dave, bradfitz, dvyukov, rsc CC=golang-dev https://golang.org/cl/7820045
-
- 14 Mar, 2013 2 commits
-
-
Dmitriy Vyukov authored
vs tip: BenchmarkTCP4OneShot 172994 40485 -76.60% BenchmarkTCP4OneShot-2 96581 30028 -68.91% BenchmarkTCP4OneShot-4 52615 18454 -64.93% BenchmarkTCP4OneShot-8 26351 12289 -53.36% BenchmarkTCP4OneShot-16 12258 16093 +31.29% BenchmarkTCP4OneShot-32 13200 17045 +29.13% BenchmarkTCP4OneShotTimeout 124814 42932 -65.60% BenchmarkTCP4OneShotTimeout-2 99090 29040 -70.69% BenchmarkTCP4OneShotTimeout-4 51860 18455 -64.41% BenchmarkTCP4OneShotTimeout-8 26100 12073 -53.74% BenchmarkTCP4OneShotTimeout-16 12198 16654 +36.53% BenchmarkTCP4OneShotTimeout-32 13438 17143 +27.57% BenchmarkTCP4Persistent 115647 7782 -93.27% BenchmarkTCP4Persistent-2 58024 4808 -91.71% BenchmarkTCP4Persistent-4 24715 3674 -85.13% BenchmarkTCP4Persistent-8 16431 2407 -85.35% BenchmarkTCP4Persistent-16 2336 1875 -19.73% BenchmarkTCP4Persistent-32 1689 1637 -3.08% BenchmarkTCP4PersistentTimeout 79754 7859 -90.15% BenchmarkTCP4PersistentTimeout-2 57708 5952 -89.69% BenchmarkTCP4PersistentTimeout-4 26907 3823 -85.79% BenchmarkTCP4PersistentTimeout-8 15036 2567 -82.93% BenchmarkTCP4PersistentTimeout-16 2507 1903 -24.09% BenchmarkTCP4PersistentTimeout-32 1717 1627 -5.24% vs old scheduler: benchmark old ns/op new ns/op delta BenchmarkTCPOneShot 192244 40485 -78.94% BenchmarkTCPOneShot-2 63835 30028 -52.96% BenchmarkTCPOneShot-4 35443 18454 -47.93% BenchmarkTCPOneShot-8 22140 12289 -44.49% BenchmarkTCPOneShot-16 16930 16093 -4.94% BenchmarkTCPOneShot-32 16719 17045 +1.95% BenchmarkTCPOneShotTimeout 190495 42932 -77.46% BenchmarkTCPOneShotTimeout-2 64828 29040 -55.20% BenchmarkTCPOneShotTimeout-4 34591 18455 -46.65% BenchmarkTCPOneShotTimeout-8 21989 12073 -45.10% BenchmarkTCPOneShotTimeout-16 16848 16654 -1.15% BenchmarkTCPOneShotTimeout-32 16796 17143 +2.07% BenchmarkTCPPersistent 81670 7782 -90.47% BenchmarkTCPPersistent-2 26598 4808 -81.92% BenchmarkTCPPersistent-4 15633 3674 -76.50% BenchmarkTCPPersistent-8 18093 2407 -86.70% BenchmarkTCPPersistent-16 17472 1875 -89.27% BenchmarkTCPPersistent-32 7679 1637 -78.68% BenchmarkTCPPersistentTimeout 83186 7859 -90.55% BenchmarkTCPPersistentTimeout-2 26883 5952 -77.86% BenchmarkTCPPersistentTimeout-4 15776 3823 -75.77% BenchmarkTCPPersistentTimeout-8 18180 2567 -85.88% BenchmarkTCPPersistentTimeout-16 17454 1903 -89.10% BenchmarkTCPPersistentTimeout-32 7798 1627 -79.14% R=golang-dev, iant, bradfitz, dave, rsc CC=golang-dev https://golang.org/cl/7579044
-
Dmitriy Vyukov authored
vs tip: benchmark old ns/op new ns/op delta BenchmarkTCP4Persistent 67786 33175 -51.06% BenchmarkTCP4Persistent-2 49085 31227 -36.38% BenchmarkTCP4PersistentTimeout 69265 32565 -52.98% BenchmarkTCP4PersistentTimeout-2 49217 32588 -33.79% vs old scheduler: benchmark old ns/op new ns/op delta BenchmarkTCP4Persistent 63517 33175 -47.77% BenchmarkTCP4Persistent-2 54760 31227 -42.97% BenchmarkTCP4PersistentTimeout 63234 32565 -48.50% BenchmarkTCP4PersistentTimeout-2 56956 32588 -42.78% R=golang-dev, bradfitz, devon.odell, mikioh.mikioh, iant, rsc CC=golang-dev, pabuhr https://golang.org/cl/7569043
-