Re: libnuma/numactl 2.0.4 release announced

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

 



On Mon, Jul 26, 2010 at 05:29:21PM -0500, Cliff Wickman wrote:
> Hi linux-numa members,
> 
> libnuma/numactl release 2.0.4 was announced today on freshmeat.net.
> 
> The tarball is at ftp://oss.sgi.com/www/projects/libnuma/download/
> and the CHANGES file within it list the patches since 2.0.3.
> 
> Thanks especially to those who provided patches and testing.

Cliff,

I actually found a bug now (looks like exactly one day too late, 
how it goes). 

The new code does not correct for the -1 quirk in the kernel API for node 
masks, unlike the v1 code did. So the last bit in the node masks is going to 
be missed.

-Andi


diff -u numactl-2.0.4-rc1/libnuma.c-o numactl-2.0.4-rc1/libnuma.c
--- numactl-2.0.4-rc1/libnuma.c-o	2010-07-27 08:49:51.000000000 +0200
+++ numactl-2.0.4-rc1/libnuma.c	2010-07-27 08:51:20.000000000 +0200
@@ -249,19 +249,19 @@
 
 static void setpol(int policy, struct bitmask *bmp)
 { 
-	if (set_mempolicy(policy, bmp->maskp, bmp->size) < 0)
+	if (set_mempolicy(policy, bmp->maskp, bmp->size + 1) < 0)
 		numa_error("set_mempolicy");
 } 
 
 static void getpol(int *oldpolicy, struct bitmask *bmp)
 { 
-	if (get_mempolicy(oldpolicy, bmp->maskp, bmp->size, 0, 0) < 0)
+	if (get_mempolicy(oldpolicy, bmp->maskp, bmp->size + 1, 0, 0) < 0)
 		numa_error("get_mempolicy");
 } 
 
 static void dombind(void *mem, size_t size, int pol, struct bitmask *bmp)
 { 
-	if (mbind(mem, size, pol, bmp ? bmp->maskp : NULL, bmp ? bmp->size : 0, 
+	if (mbind(mem, size, pol, bmp ? bmp->maskp : NULL, bmp ? bmp->size + 1 : 0, 
 		  mbind_flags) < 0)
 		numa_error("mbind"); 
 } 
--
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