Messages in this thread | | | From | Arnd Bergmann <> | Subject | Re: cpumask: fix compat getaffinity | Date | Wed, 15 Dec 2010 15:40:51 +0100 |
| |
On Tuesday 14 December 2010, Josh Hunt wrote: > > I realize this thread is fairly old, but I have a question about this > statement in the changelog: > > > On NUMA systems with less than 32 possibly CPUs, the > > current compat_sys_sched_getaffinity now returns '4' > > instead of the actual NR_CPUS/8, which makes libnuma > > bail out when parsing the cpumap. > > This does not seem accurate, at least not on my system with NR_CPUS=32 > and nr_cpu_ids=8. The smallest value retlen will ever be set to is > sizeof(long) which is 8 on most modern systems. This breaks the > statement that this function will now return NR_CPUS/8.
Yes, I think the description is a bit misleading there. The point was that it should return the number that the sysfs files are based on, instead of the smallest multiple of sizeof(compat_long) that can hold the installed CPUs.
Arnd
| |