1. 19 Sep, 2017 3 commits
  2. 18 Sep, 2017 22 commits
  3. 17 Sep, 2017 4 commits
  4. 15 Sep, 2017 4 commits
    • Kirill Smelkov's avatar
      X rxghandoff · 8021a1d5
      Kirill Smelkov authored
      With some care it is possible for serveRecv to put itself to pause and
      handoff execution to goroutine for which a packet arrived.
      
      See comments in serveRecv about how it is done.
      
      For BenchmarkTCPlosr cuts RTT 12.5μs -> 6.6μs .
      8021a1d5
    • Kirill Smelkov's avatar
      . · 4df008a0
      Kirill Smelkov authored
      4df008a0
    • Kirill Smelkov's avatar
      . · a922259e
      Kirill Smelkov authored
      a922259e
    • Kirill Smelkov's avatar
      . · b2fe5727
      Kirill Smelkov authored
      b2fe5727
  5. 14 Sep, 2017 7 commits
    • Kirill Smelkov's avatar
      X add benchmark RTT over plain net.Conn with serveRecv-style RX handler · 496bd425
      Kirill Smelkov authored
      BenchmarkSyncChanRTT-4           5000000               350 ns/op
      BenchmarkBufChanRTT-4            5000000               352 ns/op
      BenchmarkBufChanAXRXRTT-4        3000000               407 ns/op
      BenchmarkNetPipeRTT-4            2000000               938 ns/op
      BenchmarkNetPipeRTTsr-4          1000000              1594 ns/op	<-- here
      BenchmarkTCPlo-4                  300000              4814 ns/op
      BenchmarkTCPlosr-4                100000             12261 ns/op	<-- here
      BenchmarkLinkNetPipeRTT-4         500000              3017 ns/op
      BenchmarkLinkTCPRTT-4             100000             15650 ns/op
      
      the δ beetwen TCPlo + serveRecv style RX and full link over TCPlo is ~ 3μs.
      
      -> need to find out why TCPlosr = TCPlo + 8μs
      496bd425
    • Kirill Smelkov's avatar
      X ... but negative impact on separate client / server processes, strange ... · 68738036
      Kirill Smelkov authored
      without runtime.Gosched
      
      null:00   ; oid=0..16995  nread=68269354  t=536.560158ms (31.569µs / object)  x=zsha1.go
      null:00   ; oid=0..16995  nread=68269354  t=532.416867ms (31.326µs / object)  x=zsha1.go
      null:00   ; oid=0..16995  nread=68269354  t=536.958977ms (31.593µs / object)  x=zsha1.go
      null:00   ; oid=0..16995  nread=68269354  t=534.170594ms (31.429µs / object)  x=zsha1.go
      
      with runtime.Gosched
      
      null:00   ; oid=0..16995  nread=68269354  t=594.966346ms (35.006µs / object)  x=zsha1.go
      null:00   ; oid=0..16995  nread=68269354  t=597.510359ms (35.155µs / object)  x=zsha1.go
      null:00   ; oid=0..16995  nread=68269354  t=598.251026ms (35.199µs / object)  x=zsha1.go
      null:00   ; oid=0..16995  nread=68269354  t=596.02138ms (35.068µs / object)  x=zsha1.go
      
      ----
      
      -> trace shows runtime.Gosched indeed switches to woken up G without
      second syscall in serveRecv but serveRecv migrates to different M (so
      different CPU)
      68738036
    • Kirill Smelkov's avatar
      X serveRecv: help Go scheduler to switch to receiving G sooner · b0dda9d2
      Kirill Smelkov authored
      LinkNetPipeRTT-4  3.05µs ± 1%  2.99µs ± 0%   -2.05%  (p=0.008 n=5+5)
      LinkTCPRTT-4      15.9µs ± 1%  14.3µs ± 2%  -10.11%  (p=0.008 n=5+5)
      b0dda9d2
    • Kirill Smelkov's avatar
      X remove defer from rx/tx hot paths · 4989918a
      Kirill Smelkov authored
      - BenchmarkLinkNetPipeRTT-4         500000              3189 ns/op             225 B/op          5 allocs/op
      + BenchmarkLinkNetPipeRTT-4         500000              3035 ns/op             225 B/op          5 allocs/op
      4989918a
    • Kirill Smelkov's avatar
      X no select for acceptq - similarly for rxq path · e055406a
      Kirill Smelkov authored
      - BenchmarkLinkNetPipeRTT-4         500000              3555 ns/op             225 B/op          5 allocs/op
      + BenchmarkLinkNetPipeRTT-4         500000              3189 ns/op             225 B/op          5 allocs/op
      e055406a
    • Kirill Smelkov's avatar
      X Conn.Recv: receive without select · c28ad4d0
      Kirill Smelkov authored
      - BenchmarkLinkNetPipeRTT-4         500000              3768 ns/op             225 B/op          5 allocs/op
      + BenchmarkLinkNetPipeRTT-4         500000              3555 ns/op             225 B/op          5 allocs/op
      c28ad4d0
    • Kirill Smelkov's avatar