numa_all_cpus_ptr reports the wrong thing when bound to cpu0
Issue
- There is a global pointer named 'numa_all_cpus_ptr' which is broken in that it doesn't function as documented.
- It is supposed to be set to ' a bitmask that is allocated by the library with bits representing all cpus on which the calling thread may execute.
- This seems to not work when the bitmask is set to only CPU0
$./t
numa_all_cpus_ptr: 1111111111111111111111111111111100
Number of CPUS in numa_all_cpus_ptr: 32
$ taskset -c 4 ./t
numa_all_cpus_ptr: 0000100000000000000000000000000000
Number of CPUS in numa_all_cpus_ptr: 1
$ taskset -c 0 ./t
numa_all_cpus_ptr: 1111111111111111111111111111111100
Number of CPUS in numa_all_cpus_ptr: 32
$ taskset -c 1 ./t
numa_all_cpus_ptr: 0100000000000000000000000000000000
Number of CPUS in numa_all_cpus_ptr: 1
- Note that the taskset -c0 ./t case should only have 1 bit set in the 0th position.
Environment
Red Hat Enterprise Linux 6 Update 2
numactl-2.0.3-9.el6
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
