Commit 68738036 authored by Kirill Smelkov's avatar Kirill Smelkov

X ... but negative impact on separate client / server processes, strange ...

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)
parent b0dda9d2
...@@ -29,7 +29,7 @@ import ( ...@@ -29,7 +29,7 @@ import (
"math" "math"
"net" "net"
"reflect" "reflect"
"runtime" //"runtime"
"sync" "sync"
"sync/atomic" "sync/atomic"
"time" "time"
...@@ -791,7 +791,7 @@ func (nl *NodeLink) serveRecv() { ...@@ -791,7 +791,7 @@ func (nl *NodeLink) serveRecv() {
// By default proc runq will execute only when sendRecv blocks // By default proc runq will execute only when sendRecv blocks
// next time deep in nl.recvPkt(), but let's force the switch // next time deep in nl.recvPkt(), but let's force the switch
// now without additional wating to reduce latency. // now without additional wating to reduce latency.
runtime.Gosched() //runtime.Gosched()
/* /*
// XXX goes away in favour of .rxdownFlag; reasons // XXX goes away in favour of .rxdownFlag; reasons
// - no need to reallocate rxdown for light conn // - no need to reallocate rxdown for light conn
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment