3 ms·
I don't know anything about Go internals, but presumably you'd use libnuma http://linux.die.net/man/3/numa http://linux.die.net/man/3/numa to bind threads to a
by wmf 10y ago
I don't know anything about Go internals, but presumably you'd use libnuma http://linux.die.net/man/3/numa http://linux.die.net/man/3/numa to bind threads to a NUMA node. I guess libnuma uses info in /proc to find the topology, the mbind() system call to set memory locality, and the sched_setaffinity() system call to pin threads.
(Or I guess Go would reimplement libnuma themselves since they don't use C.)
- signa11 10y ago> Or I guess Go would reimplement libnuma themselves since they don't use C it needs to be cross-platform. unless there is posix spec which was implemented as part of this.
- 4ad 10y agoAll the NUMA stuff is highly OS-specific. Every port will need its own hooks into the NUMA-related system calls. If Go ever gets a NUMA-aware scheduler, Linux will get it first and I suspect most other platforms might not get it at all.