Re: [RFC] numactl doesn't work as expected with --phycpubind II

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Cliff Wickman wrote:

You are using version 1.0.3 I assume.  We have 1.0.3-rc1 and 1.0.3-rc2
on the download page (
I suggest you send me the final form of your patch and I add it and post
the source as 1.0.3.   Sound reasonable?

I am using still older version of numactl, it is 0.9.6. numactl code base 1.0.3 has call to move_page system call and this will cause problems that I have mentioned in previous mail

+    cpu_set_t mask;
+    if( numa_sched_getaffinity(0, sizeof(cpu_set_t), &mask) < 0 ){
+        perror("numa_sched_getaffinity:");
> Ah noticed another problem. Please don't rely on the glibc cpuset_t,
> there's no guarantee it's big enough.

> In fact libnuma.c already has code for this in set_numa_max_cpu().
> Please reuse that. Just make sure you don't create a backdoor
> interface into libnuma.

Andi suggested to used the existing functions to get through the problem, suggested to use 'set_numa_max_cpu', its equivalent in 0.9.6 version is 'number_of_configured_cpus'. On using this in util.c to get the maximum cpu number solves the problem.

But I was not convinced with the solution, It returns total number of bytes in cpu mask (bit array) this is not what is expected logically. So what I am trying to get is - even the latest code doesn't have any equivalent function which does the work of sysconf(_SC_NPROCESSORS_CONF) correctly. Hence we may have to keep the implementation to return the maximum cpu active, may be pushing it into libnuma.c
 Please let me know your thoughts

To unsubscribe from this list: send the line "unsubscribe linux-numa" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

[Home]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Free Online Dating]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Devices]

Add to Google Powered by Linux