mirror of https://github.com/k3s-io/k3s
![]() Automatic merge from submit-queue Remove GOMAXPROCS() calls because they are unnecessary Now we're setting GOMAXPROCS when every binary starts up, but we don't have to do that anymore, since we've upgraded to Go 1.6 Documentation for it: > func GOMAXPROCS(n int) int > GOMAXPROCS sets the maximum number of CPUs that can be executing simultaneously and returns the previous setting. If n < 1, it does not change the current setting. The number of logical CPUs on the local machine can be queried with NumCPU. This call will go away when the scheduler improves. A simple program to prove it's unnecessary: ```go package main import ( "fmt" "runtime" ) func main(){ numCPUBefore := runtime.GOMAXPROCS(runtime.NumCPU()) numCPUAfter := runtime.GOMAXPROCS(runtime.NumCPU()) fmt.Println(numCPUBefore, numCPUAfter) } ``` Output with Go 1.4.2: `1 4` Output with Go 1.6.2: `4 4` So I think we should remove calls to GOMAXPROCS now, and it should be pretty straightforward @thockin @wojtek-t @gmarek @lavalamp @vishh |
||
---|---|---|
.. | ||
gendocs | ||
genkubedocs | ||
genman | ||
genswaggertypedocs | ||
genutils | ||
genyaml | ||
hyperkube | ||
kube-apiserver | ||
kube-controller-manager | ||
kube-dns | ||
kube-proxy | ||
kubectl | ||
kubelet | ||
kubemark | ||
kubernetes-discovery | ||
libs/go2idl | ||
linkcheck | ||
mungedocs | ||
OWNERS |