Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
neoppod
Commits
d28d7cef
Commit
d28d7cef
authored
Sep 07, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
7a97206e
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
243 additions
and
120 deletions
+243
-120
go/NOTES-go
go/NOTES-go
+14
-0
go/neo/connection_test.go
go/neo/connection_test.go
+13
-4
go/todo.dot
go/todo.dot
+31
-7
go/todo.svg
go/todo.svg
+185
-109
No files found.
go/NOTES-go
View file @
d28d7cef
...
...
@@ -3,6 +3,20 @@
? random access -> mmap
- scheduler won't use free P if a G is taking time and other Gs are queued after it on the same P:
https://groups.google.com/forum/#!topic/golang-nuts/8KYER1ALelg
e870f06c (runtime: yield time slice to most recently readied G)
ea0386f8 (runtime: improve randomized stealing logic)
4bb491b1 (runtime: improve scheduler fairness)
/s steal
findrunnable
runqsteal
? runqgrab
schedule <- top entry
https://golang.org/s/go11sched -> syscall/M partking and Unparking/Spinning
----------------------------------------
- TODO stats for events (packets received, errors, etc)
...
...
go/neo/connection_test.go
View file @
d28d7cef
...
...
@@ -36,6 +36,8 @@ import (
"github.com/kylelemons/godebug/pretty"
"github.com/pkg/errors"
"runtime"
)
func
xclose
(
c
io
.
Closer
)
{
...
...
@@ -721,11 +723,9 @@ func TestHandshake(t *testing.T) {
// ---- benchmarks ----
// rtt over chan - for comparision as base
func
BenchmarkChanRTT
(
b
*
testing
.
B
)
{
c12
:=
make
(
chan
byte
)
c21
:=
make
(
chan
byte
)
func
benchmarkChanRTT
(
b
*
testing
.
B
,
c12
,
c21
chan
byte
)
{
go
func
()
{
runtime
.
LockOSThread
()
for
{
c
,
ok
:=
<-
c12
if
!
ok
{
...
...
@@ -748,6 +748,15 @@ func BenchmarkChanRTT(b *testing.B) {
close
(
c12
)
}
func
BenchmarkSyncChanRTT
(
b
*
testing
.
B
)
{
benchmarkChanRTT
(
b
,
make
(
chan
byte
),
make
(
chan
byte
))
}
func
BenchmarkBufChanRTT
(
b
*
testing
.
B
)
{
benchmarkChanRTT
(
b
,
make
(
chan
byte
,
1
),
make
(
chan
byte
,
1
))
}
// rtt over net.Conn Read/Write
func
benchmarkNetConnRTT
(
b
*
testing
.
B
,
c1
,
c2
net
.
Conn
)
{
buf1
:=
make
([]
byte
,
1
)
...
...
go/todo.dot
View file @
d28d7cef
...
...
@@ -10,11 +10,24 @@ digraph {
Sgo
->
load_serial_next
;
Sgo
->
Sgo_speed
;
Sgo_speed
->
Mmap_go
;
Sgo_speed
->
sha1_index
;
//Sgo_speed -> B_link_recv;
Sgo_speed
->
garbage
;
Sgo_speed
->
gosched
;
//Sgo_speed -> gosched;
Sgo_speed
->
diskio
;
Sgo_speed
->
ConnClose_notimer
;
Sgo_speed
->
QSgo_speed
;
QSgo_speed
->
Mmap_go
;
QSgo_speed
->
sha1_index
;
garbage
->
pktbuf_alloc
;
garbage
->
msg_alloc
;
garbage
->
conn_alloc
;
diskio
->
gosched
;
diskio
->
GOMAXPROCS
;
Cpy_r_Sgo
->
Sgo
;
//Cpy_r_Sgo -> Protog_fix;
...
...
@@ -33,12 +46,13 @@ digraph {
Mgo
[
label
=<
M
<sub>
go
</sub>
>
style
=
filled
fillcolor
=
lightyellow
]
;
SCgo_t
[
label
=<
S
<sub>
go
</sub>
/ C
<sub>
go
</sub>
tests
>
style
=
filled
fillcolor
=
lightyellow
]
;
Sgo_speed
[
label
=<
S
<sub>
go
</sub>
speed/latency
>
]
;
Cpy_r_Sgo
[
label
=<
C
<sub>
py
</sub>
read S
<sub>
go
</sub>
>
]
;
Cgo_r_Sgo
[
label
=<
C
<sub>
go
</sub>
read S
<sub>
go
</sub>
>
]
;
Cgo_r_Spy
[
label
=<
C
<sub>
go
</sub>
read S
<sub>
py
</sub>
>
]
;
Cpy_r_Sgo
[
label
=<
C
<sub>
py
</sub>
read S
<sub>
go
</sub>
>
style
=
filled
fillcolor
=
lightyellow
]
;
Cgo_r_Sgo
[
label
=<
C
<sub>
go
</sub>
read S
<sub>
go
</sub>
>
style
=
filled
fillcolor
=
lightyellow
]
;
Cgo_r_Spy
[
label
=<
C
<sub>
go
</sub>
read S
<sub>
py
</sub>
>
style
=
filled
fillcolor
=
lightyellow
]
;
Cleanup
[
label
=
"Cleanup history"
]
;
Post
[
label
=
"Post"
]
;
//Cpy_patch [label=<py patch: ConnID py=go> style=filled fillcolor=lightyellow]; // C<sub>py</sub> patch for ConnID interop. with S<sub>go</sub>>];
Mmap_go
[
label
=
"io.ReaderAt via mmap"
]
;
Mmap_go
[
label
=
"
?
io.ReaderAt via mmap"
]
;
//Protog_fix [label="proto(go/py) compat fix" style=filled fillcolor=lightyellow];
//Mpy_vs_Sgo [label=<M<sub>py</sub> vs S<sub>go</sub>: try/fix> style=filled fillcolor=lightyellow];
...
...
@@ -52,4 +66,14 @@ digraph {
//Cgo -> Cgo_tasks;
//Cgo_tasks [label="- talkMaster\n- update nodeTab/partTab\n- dial S on demand\n..." style=filled fillcolor=lightyellow];
QSgo_speed
[
label
=<
?
>
]
;
pktbuf_alloc
[
label
=<
PktBuf
>
]
;
msg_alloc
[
label
=<
Msg
>
]
;
conn_alloc
[
label
=<
Conn
>
]
;
ConnClose_notimer
[
label
=
"Conn.Close\nno timer"
]
;
diskio
[
label
=
"disk io"
]
;
GOMAXPROCS
[
label
=
"? GOMAXPROCS"
]
;
}
go/todo.svg
View file @
d28d7cef
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment