Closed solardiz closed 5 years ago
I took care of this in 5a7eef2a1a7d99f6a5a08cf972b07d08d601ae37 for Linux on x86(-64). I think this is good enough for now, and presence of this code in the tree will be a reminder to us to possibly add similar code for other systems.
Upstream cpuminer will only bind threads to logical CPUs when the thread count is a multiple of logical CPU count, and will do so in a trivial manner. Current yespower generally runs best with one thread per physical core. Systems vary in their number of hardware thread per core, and in their physical and logical topology. Thus, ideally we need to extract these mappings from the OS and bind threads to physical cores accordingly. Also, by default run as many threads as there are physical cores.