As pointed out in #1939, the current ncpus detection is based on eligible CPUs, in order to reduce resource usage / fragmentation for the default configuration. However in some cases like the mutex spin detection this is suboptimal (for example), as the CPU affinity setting may change over time. We should also detect n_total_cpus and refer to that in some cases.