From 8b38cdaba190303f434238fb9692aefb2f9955f7 Mon Sep 17 00:00:00 2001 From: Paul Banks Date: Mon, 30 Apr 2018 18:17:39 +0100 Subject: [PATCH] Add TODO for false-sharing --- connect/proxy/conn.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/connect/proxy/conn.go b/connect/proxy/conn.go index fe52853f0..d55e861bf 100644 --- a/connect/proxy/conn.go +++ b/connect/proxy/conn.go @@ -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 }