Remove CPU pinning flags that measured slower than the scheduler
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user