Sharyathi Nagesh wrote: > 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. Cliff might disagree, but in my mind 2.x is still a kind of beta version and might need some more testing before it should be pushed out to distros. > I tried that option, #define _GNU_SOURCE, but it was not working, hence > I provided this hack. #define _GNU_SOURCE 1 >>> +#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 Use the existing code for this. -Andi -- 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