An error occurred fetching the project authors.
  1. 13 Mar, 2019 1 commit
    • Mikio Hara's avatar
      runtime, internal/poll, net: report event scanning error on read event · a5fdd58c
      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: default avatarIan Lance Taylor <iant@golang.org>
      a5fdd58c
  2. 04 Mar, 2019 1 commit
    • Josh Bleecher Snyder's avatar
      internal/poll: copy and use errnoErr to avoid allocations · 4fb900e9
      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: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      4fb900e9
  3. 02 Nov, 2018 4 commits
    • Brad Fitzpatrick's avatar
      all: use "reports whether" consistently in the few places that didn't · 3813edf2
      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: default avatarIan Lance Taylor <iant@golang.org>
      3813edf2
    • Clément Chigot's avatar
      internal/poll, os/exec, runtime: replace PollDescriptor by IsPollDescriptor · 5ee06f54
      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: default avatarIan Lance Taylor <iant@golang.org>
      5ee06f54
    • Dmitry Vyukov's avatar
      runtime: avoid runtimeNano call on a common netpoll path · 21f7f012
      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: default avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: Dmitry Vyukov <dvyukov@google.com>
      21f7f012
    • Dmitry Vyukov's avatar
      runtime: move nanotime wrappers to time and poll packages · ff51353c
      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: default avatarIan Lance Taylor <iant@golang.org>
      ff51353c
  4. 03 Oct, 2018 1 commit
  5. 25 Oct, 2017 1 commit
  6. 19 Oct, 2017 1 commit
  7. 14 Jul, 2017 1 commit
  8. 26 Apr, 2017 1 commit
    • Ian Lance Taylor's avatar
      os, net, internal/poll: return consistent error for closed socket · fb4b4342
      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: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      fb4b4342
  9. 07 Mar, 2017 1 commit
  10. 15 Feb, 2017 2 commits
    • Ian Lance Taylor's avatar
      os: use poller for file I/O · c05b06a1
      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: default avatarRuss Cox <rsc@golang.org>
      c05b06a1
    • Dave Cheney's avatar
      internal/poll: remove unused poll.pollDesc methods · 81ec3f6a
      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: default avatarIan Lance Taylor <iant@golang.org>
      81ec3f6a
  11. 13 Feb, 2017 1 commit
  12. 30 Aug, 2016 1 commit
  13. 24 Aug, 2016 1 commit
    • Ian Lance Taylor's avatar
      net: use runtime.Keepalive for *netFD values · 873dca4c
      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: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      873dca4c
  14. 17 Mar, 2016 1 commit
  15. 23 Feb, 2016 1 commit
  16. 04 Feb, 2015 1 commit
  17. 08 Sep, 2014 1 commit
  18. 25 Feb, 2014 1 commit
  19. 24 Feb, 2014 1 commit
    • Jay Weisskopf's avatar
      runtime: use monotonic clock for timers (linux/386, linux/amd64) · 86c976ff
      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
      86c976ff
  20. 23 Aug, 2013 1 commit
  21. 20 Aug, 2013 1 commit
  22. 17 Aug, 2013 1 commit
  23. 15 Aug, 2013 1 commit
    • Mikio Hara's avatar
      net: enable runtime-integrated network pollster on freebsd, openbsd · cb3b2922
      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
      cb3b2922
  24. 13 Aug, 2013 1 commit
  25. 09 Aug, 2013 1 commit
    • Dmitriy Vyukov's avatar
      net: add special netFD mutex · 23e15f72
      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
      23e15f72
  26. 06 Aug, 2013 1 commit
    • Mikio Hara's avatar
      net: separate pollster initialization from network file descriptor allocation · 6a76bca3
      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
      6a76bca3
  27. 22 Jul, 2013 1 commit
    • Alex Brainman's avatar
      net: implement netpoll for windows · 6ea7bf25
      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
      6ea7bf25
  28. 25 Jun, 2013 1 commit
  29. 20 May, 2013 2 commits
  30. 15 Mar, 2013 1 commit
    • Shenghou Ma's avatar
      net, runtime: enable runtime-integrated pollster on Linux/ARM. · 1d64d04d
      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
      1d64d04d
  31. 14 Mar, 2013 2 commits
    • Dmitriy Vyukov's avatar
      runtime: integrated network poller for linux · 49e03008
      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
      49e03008
    • Dmitriy Vyukov's avatar
      runtime: integrated network poller for darwin · 0bee99ab
      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
      0bee99ab