* [PATCH] Fix mbind_migrate_pages
@ 2009-01-10 5:51 Andi Kleen
0 siblings, 0 replies; only message in thread
From: Andi Kleen @ 2009-01-10 5:51 UTC (permalink / raw)
To: cpw, linux-numa
The nodemask conversion of mbind_mig_pages had some off by one
bugs, making the program always fail on 2 node systems.
Noticed by Jay Weinstein.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
diff -urp numactl-2.0.2/test/mbind_mig_pages.c numactl-2.0.2-hack//test/mbind_mig_pages.c
--- numactl-2.0.2/test/mbind_mig_pages.c 2008-08-05 16:36:58.000000000 +0200
+++ numactl-2.0.2-hack//test/mbind_mig_pages.c 2009-01-10 06:26:54.000000000 +0100
@@ -91,7 +91,7 @@ int main(int argc, char **argv)
/* Move to node zero */
printf("\nMoving pages via mbind to node 0 ...\n");
rc = mbind(pages, page_count * pagesize, MPOL_BIND, old_nodes->maskp,
- old_nodes->size, MPOL_MF_MOVE | MPOL_MF_STRICT);
+ old_nodes->size + 1, MPOL_MF_MOVE | MPOL_MF_STRICT);
if (rc < 0) {
perror("mbind");
errors++;
@@ -100,7 +100,7 @@ int main(int argc, char **argv)
printf("\nMoving pages via mbind from node 0 to 1 ...\n");
rc = mbind(pages, page_count * pagesize, MPOL_BIND, new_nodes->maskp,
- new_nodes->size, MPOL_MF_MOVE | MPOL_MF_STRICT);
+ new_nodes->size + 1, MPOL_MF_MOVE | MPOL_MF_STRICT);
if (rc < 0) {
perror("mbind");
errors++;
--
ak@linux.intel.com
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-01-10 5:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-10 5:51 [PATCH] Fix mbind_migrate_pages Andi Kleen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.