Add TODO for false-sharing

This commit is contained in:
Paul Banks 2018-04-30 18:17:39 +01:00 committed by Mitchell Hashimoto
parent 4c1b82834b
commit 8b38cdaba1
No known key found for this signature in database
GPG Key ID: 744E147AA52F5B0A
1 changed files with 4 additions and 1 deletions

View File

@ -8,7 +8,10 @@ import (
// Conn represents a single proxied TCP connection.
type Conn struct {
src, dst net.Conn
src, dst net.Conn
// TODO(banks): benchmark and consider adding _ [8]uint64 padding between
// these to prevent false sharing between the rx and tx goroutines when
// running on separate cores.
srcW, dstW countWriter
stopping int32
}