1. 21 Jun, 2017 3 commits
  2. 19 Jun, 2017 2 commits
  3. 16 Jun, 2017 1 commit
  4. 14 Jun, 2017 2 commits
  5. 13 Jun, 2017 2 commits
  6. 10 Jun, 2017 1 commit
  7. 09 Jun, 2017 2 commits
  8. 05 Jun, 2017 2 commits
  9. 02 Jun, 2017 1 commit
  10. 29 May, 2017 1 commit
  11. 27 May, 2017 2 commits
    • Mikio Hara's avatar
      ipv6: add {Read,Write}Batch methods to PacketConn · 48359f4f
      Mikio Hara authored
      This change provides message IO functionality that may support the
      construction of modern datagram transport protocols.
      
      The modern datagram transport protocols on a multihomed node basically
      need to control each packet path for traffic engineering by using
      information belongs to network- or link-layer implementation. In
      addtion, it's desirable to be able to do simultaneous transmission
      across multiple network- or link-layer adjacencies wihtout any
      additional cost.
      
      The ReadBatch and WriteBatch methods of PacketConn can be used to read
      and write an IO message that contains the information of network- or
      link-layer implementation, and read and write a batch of IO messages
      on Linux. The Marshal and Parse methods of ControlMessage can help to
      marshal and parse information contained in IO messages.
      
      Updates golang/go#3661.
      
      Change-Id: I94484e2e135f4969ddf5c2548bf6be0cc16888bf
      Reviewed-on: https://go-review.googlesource.com/38276
      Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      48359f4f
    • Mikio Hara's avatar
      ipv4: add {Read,Write}Batch methods to {Packet,Raw}Conn · b7a1f62a
      Mikio Hara authored
      This change provides message IO functionality that may support the
      construction of modern datagram transport protocols.
      
      The modern datagram transport protocols on a multihomed node basically
      need to control each packet path for traffic engineering by using
      information belongs to network- or link-layer implementation. In
      addtion, it's desirable to be able to do simultaneous transmission
      across multiple network- or link-layer adjacencies wihtout any
      additional cost.
      
      The ReadBatch and WriteBatch methods of PacketConn and RawConn can be
      used to read and write an IO message that contains the information of
      network- or link-layer implementation, and read and write a batch of
      IO messages on Linux. The Marshal and Parse methods of ControlMessage
      and Header can help to marshal and parse information contained in IO
      messages.
      
      Updates golang/go#3661.
      
      Change-Id: Ia84a9d3bc51641406eaaf4258f2a3066945cc323
      Reviewed-on: https://go-review.googlesource.com/38275
      Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      b7a1f62a
  12. 26 May, 2017 4 commits
    • Tom Bergan's avatar
      http2: fix nil dereference after Read completes with an error · 3470a06c
      Tom Bergan authored
      Case happens if Read is called after it has already returned an error
      previously. Verified that the new TestPipeCloseWithError test fails
      before this change but passes after.
      
      Updates golang/go#20501
      
      Change-Id: I636fbb194f2d0019b0722556cc25a88da2d18e13
      Reviewed-on: https://go-review.googlesource.com/44330
      Run-TryBot: Tom Bergan <tombergan@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      3470a06c
    • David Lazar's avatar
      http2: fix typo in comment · 06b2bf2f
      David Lazar authored
      Change-Id: I0febb967cf55118693952332bbb6f740616cfd39
      Reviewed-on: https://go-review.googlesource.com/44271
      Run-TryBot: David Lazar <lazard@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      06b2bf2f
    • Mikio Hara's avatar
      internal/socket: add message IO functionality · b8b13433
      Mikio Hara authored
      This change adds portable message IO methods of Conn, IO message and
      control message types, and parse methods for the types to provide
      those functionality to the ipv4 and ipv6 packages.
      
      With this change, the ipv4 and ipv6 packages can provide low-level
      (but less heap allocation and the cost of invoking system calls) API
      such as read and write operations for a batch of IO messages.
      
      On vanilla linux/amd64 virtual machine:
      BenchmarkUDP/Iter-1-2            1000000              8068 ns/op             408 B/op         14 allocs/op
      BenchmarkUDP/Batch-1-2           1000000              8610 ns/op             440 B/op         14 allocs/op
      BenchmarkUDP/Iter-2-2             500000             15390 ns/op             816 B/op         28 allocs/op
      BenchmarkUDP/Batch-2-2            500000             12715 ns/op             696 B/op         20 allocs/op
      BenchmarkUDP/Iter-4-2             200000             30763 ns/op            1632 B/op         56 allocs/op
      BenchmarkUDP/Batch-4-2            300000             21853 ns/op            1216 B/op         32 allocs/op
      BenchmarkUDP/Iter-8-2             100000             61460 ns/op            3264 B/op        112 allocs/op
      BenchmarkUDP/Batch-8-2            200000             39048 ns/op            2256 B/op         56 allocs/op
      BenchmarkUDP/Iter-16-2             50000            122408 ns/op            6528 B/op        224 allocs/op
      BenchmarkUDP/Batch-16-2           100000             72728 ns/op            4336 B/op        104 allocs/op
      BenchmarkUDP/Iter-32-2             30000            243137 ns/op           13056 B/op        448 allocs/op
      BenchmarkUDP/Batch-32-2            50000            141332 ns/op            8496 B/op        200 allocs/op
      BenchmarkUDP/Iter-64-2             20000            488125 ns/op           26112 B/op        896 allocs/op
      BenchmarkUDP/Batch-64-2            30000            282078 ns/op           16816 B/op        392 allocs/op
      BenchmarkUDP/Iter-128-2            10000            973752 ns/op           52224 B/op       1792 allocs/op
      BenchmarkUDP/Batch-128-2           10000            551021 ns/op           33456 B/op        776 allocs/op
      BenchmarkUDP/Iter-256-2             3000           1977852 ns/op          104448 B/op       3584 allocs/op
      BenchmarkUDP/Batch-256-2           10000           1252596 ns/op           66736 B/op       1544 allocs/op
      BenchmarkUDP/Iter-512-2             2000           4147495 ns/op          208896 B/op       7168 allocs/op
      BenchmarkUDP/Batch-512-2            3000           2175774 ns/op          121128 B/op       2612 allocs/op
      
      Change-Id: I3e08b28917b62dbea7936a86acb24e25ccaf5365
      Reviewed-on: https://go-review.googlesource.com/38212
      Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      b8b13433
    • Mikio Hara's avatar
      internal/socket: add platform-dependent boilerplate files · f61a7739
      Mikio Hara authored
      Change-Id: I951a1abc36083401d183d61c58a8186b5ce41c6c
      Reviewed-on: https://go-review.googlesource.com/38211Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      f61a7739
  13. 25 May, 2017 1 commit
  14. 24 May, 2017 9 commits
  15. 23 May, 2017 1 commit
  16. 22 May, 2017 3 commits
  17. 17 May, 2017 1 commit
  18. 15 May, 2017 1 commit
    • Brad Fitzpatrick's avatar
      http2: reduce the number of select cases in serverConn.server · 34057069
      Brad Fitzpatrick authored
      This drops the number of select cases in serverConn.server from 10 to
      6. It was 7 in Go 1.7. It increased to 10 in Go 1.8.
      
      * replace testing-only testHookCh with always-on grab-bag serveMsgCh
        to be used for both test purposes, and infrequently used message
        types
      
      * remove the settingsTimer.C case for the initial settings timer
        and use serveMsgCh and time.AfterFunc instead
      
      * ... and do the same for the idle timeout timer.
      
      * ... and for the shutdown timer.
      
      * remove wantStartPushCh and just send the *startPushRequest to
        serveMsgCh too
      
      I could go further with this (and plan to, later), but these are the
      safe and easy ones that don't require more work elsewhere.
      
      The speed gets better the more the request/response go via the
      serverConn.serve loop. (once per Request.Body.Read or
      ResponseWriter.Flush):
      
        name            old time/op    new time/op  delta
        ServerGets-4    138µs ± 3%     134µs ± 2%   -2.54%   (p=0.002 n=10+10)
        ServerPosts-4   176µs ±27%     154µs ± 2%   -12.62%  (p=0.011 n=10+10)
      
      Updates kubernetes/kubernetes#45216
      Updates golang/go#20302
      
      Change-Id: I18019554089d7e3d76355d7137b5957e9597e803
      Reviewed-on: https://go-review.googlesource.com/43034
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarTom Bergan <tombergan@google.com>
      34057069
  19. 13 May, 2017 1 commit
    • Tom Bergan's avatar
      http2: fix lock contention slowdown due to gracefulShutdownCh · 84f0e6f9
      Tom Bergan authored
      gracefulShutdownCh is shared by all connections in a server. When a
      server accumulates many connections (e.g., 5000 in the kubemark-5000
      benchmark), we have 5000 serverConn.serve goroutines selecting on this
      channel. This means 5000 goroutines hammer the channel's lock, which
      causes severe lock contention.
      
      The fix in this CL is to make a local proxy for gracefulShutdownCh in
      each connection so that each connection selects on gracefulShutdownCh
      at most once per connection rather than once per serverConn.serve loop
      iteration.
      
      This fix is intended to be backported quickly into Go 1.8.2. The
      downside of this fix is 2KB extra stack usage per connection. A better
      fix will be implemented in Go 1.9.
      
      Unfortunately, I have been unable to reproduce this problem locally.
      This fix was verified by the kubernetes team. See:
      https://github.com/kubernetes/kubernetes/issues/45216#issuecomment-300830243
      
      Updates golang/go#20302
      
      Change-Id: I19ab19268a6ccab9b6e9dffa0cfbc89b8c7d0f19
      Reviewed-on: https://go-review.googlesource.com/43455
      Run-TryBot: Tom Bergan <tombergan@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      84f0e6f9