From: Andi Kleen <andi@firstfloor.org>
To: cpw@sgi.com, linux-numa@vger.kernel.org
Subject: [PATCH] Fix mbind_migrate_pages
Date: Sat, 10 Jan 2009 06:51:44 +0100 [thread overview]
Message-ID: <20090110055144.GB26290@one.firstfloor.org> (raw)
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
reply other threads:[~2009-01-10 5:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090110055144.GB26290@one.firstfloor.org \
--to=andi@firstfloor.org \
--cc=cpw@sgi.com \
--cc=linux-numa@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox