From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andi Kleen Subject: Re: libnuma/numactl 2.0.4 release announced Date: Tue, 27 Jul 2010 08:53:25 +0200 Message-ID: <20100727065325.GA7813@basil.fritz.box> References: <20100726222921.GA20613@sgi.com> Mime-Version: 1.0 Return-path: Content-Disposition: inline In-Reply-To: <20100726222921.GA20613@sgi.com> Sender: linux-numa-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Cliff Wickman Cc: linux-numa@vger.kernel.org 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"); }