-
Notifications
You must be signed in to change notification settings - Fork 18k
runtime: use sched_getaffinity for getproccount on GNU/Linux #3921
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
I think this is an excellent idea. > But note that if the system is actually using CPU affinity, this will cause runtime.NumCPU to return the number of virtual processors that the process is permitted to run on, rather than the number of virtual processors on the system. Having worked in environments where affinity/cpu isolation is used, this is the behaviour I would want. The opposite, where most of the cpus are isolated from the general scheduler, yet the process believes it has access to all the CPUs leads to surprising results. |
This issue was closed by revision 4f308ed. Status changed to Fixed. |
minux
added a commit
that referenced
this issue
May 11, 2015
…U() on Linux ««« backport 3532ab6bf5be runtime: use sched_getaffinity for runtime.NumCPU() on Linux Fixes #3921. R=iant CC=golang-dev https://golang.org/cl/6448132 »»»
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: