Remove CPU pinning flags that measured slower than the scheduler

This commit is contained in:
flamingcow
2026-07-25 19:24:10 -07:00
parent 32c49ccc4b
commit abb8b81919
4 changed files with 2 additions and 58 deletions
-12
View File
@@ -2,7 +2,6 @@ package main
import (
"fmt"
"runtime"
"unsafe"
"golang.org/x/sys/unix"
@@ -115,17 +114,6 @@ func newMmsghdrs(bufs [][]byte) ([]mmsghdr, []unix.Iovec) {
return hdrs, iovs
}
func pinTo(cpu int) error {
if cpu < 0 {
return nil
}
runtime.LockOSThread()
var set unix.CPUSet
set.Zero()
set.Set(cpu)
return unix.SchedSetaffinity(0, &set)
}
func packetDrops(fd int) uint64 {
st, err := unix.GetsockoptTpacketStats(fd, unix.SOL_PACKET, unix.PACKET_STATISTICS)
if err != nil {