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

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

 



Andi,Cliff
  Thanks for your in puts
  Excuse me for the late response, I was on leave didn't see the reply

As you suggested I was thinking we can suggest distros to take the latest version of numactl ie version 2. But there is limitation, distro kernel is based on 2.6.18 and latest numactl version 2.0 uses system call move_pages which is implemented on 2.6.18-rc1 kernel and above. Numactl build fails with distro kernel.

I tried to back port the patch, but looks like lot of functions definitions have changed

So is it possible to keep the patch that I suggested, it serves our purposed for the time being and later as the distros move to later kernels we can suggest to take Numactl version 2 and above

Some observation about the patch

Andi Kleen wrote:

>> Index: numactl-0.9.8/Makefile
>> ===================================================================
>> --- numactl-0.9.8.orig/Makefile	2008-04-22 14:46:54.000000000 +0530
>> +++ numactl-0.9.8/Makefile	2008-04-22 14:47:22.000000000 +0530
>> @@ -1,6 +1,6 @@
>> # these can (and should) be overridden on the make command line for production
>>  # use
>> -CFLAGS :=  -g -Wall -O0
>> +CFLAGS :=  -g -Wall -O0 -D_GNU_SOURCE
>
> Please put the _GNU_SOURCE define into the source file. Users should be able to easily

I tried that option, #define _GNU_SOURCE, but it was not working, hence I provided this hack.

+#define BITS_PER_BYTE 8
+int get_max_cpu(void)
+{
+	int max = 0;
+	int index;
+	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.

Instead should I use a buffer with 2048 bits ?

Please let me know your thoughts, accordingly I can modify the patch
Thanks
Sharyathi
--
To unsubscribe from this list: send the line "unsubscribe linux-numa" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]     [Devices]

  Powered by Linux