Jirka Hladky, le Thu 11 Nov 2010 02:04:57 +0100, a écrit : > printf("max_os_index %u\n",max_os_index); > > linuxmask = malloc(max_os_index/HWLOC_BITS_PER_LONG * sizeof(long)); > if (!linuxmask) { > errno = ENOMEM; > goto out; > } > > err = get_mempolicy(&linuxpolicy, linuxmask, max_os_index, 0, 0); > if (err < 0) { > perror("get_mempolicy"); > goto out_with_mask; > } > ========================================================================== > > On system with 2 NUMA nodes: > $ utils/hwloc-bind --get --membind > max_os_index 1 > max_os_index 1 > max_os_index 64 > get_mempolicy: Invalid argument > hwloc_get_membind failed (errno 22 Invalid argument)
Could you try to increase the value of max_os_index? I can see in the kernel source code the following in sys_get_mempolicy: if (nmask != NULL && maxnode < MAX_NUMNODES) return -EINVAL; and MAX_NUMNODES depends on .config ... Samuel