linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [patch 3.5-rc3] mm, mempolicy: fix mbind() to do synchronous migration
@ 2012-06-21  1:00 David Rientjes
  2012-06-21 12:42 ` Mel Gorman
  2012-06-21 23:46 ` Andrew Morton
  0 siblings, 2 replies; 10+ messages in thread
From: David Rientjes @ 2012-06-21  1:00 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton
  Cc: Mel Gorman, KOSAKI Motohiro, linux-kernel, linux-mm

If the range passed to mbind() is not allocated on nodes set in the
nodemask, it migrates the pages to respect the constraint.

The final formal of migrate_pages() is a mode of type enum migrate_mode,
not a boolean.  do_mbind() is currently passing "true" which is the
equivalent of MIGRATE_SYNC_LIGHT.  This should instead be MIGRATE_SYNC
for synchronous page migration.

Signed-off-by: David Rientjes <rientjes@google.com>
---
 mm/mempolicy.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/mempolicy.c b/mm/mempolicy.c
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -1177,7 +1177,7 @@ static long do_mbind(unsigned long start, unsigned long len,
 		if (!list_empty(&pagelist)) {
 			nr_failed = migrate_pages(&pagelist, new_vma_page,
 						(unsigned long)vma,
-						false, true);
+						false, MIGRATE_SYNC);
 			if (nr_failed)
 				putback_lru_pages(&pagelist);
 		}

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-06-22  7:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-21  1:00 [patch 3.5-rc3] mm, mempolicy: fix mbind() to do synchronous migration David Rientjes
2012-06-21 12:42 ` Mel Gorman
2012-06-21 23:46 ` Andrew Morton
2012-06-22  0:46   ` Linus Torvalds
2012-06-22  1:45     ` Andrew Morton
2012-06-22  2:22       ` Linus Torvalds
2012-06-22  3:33       ` Linus Torvalds
2012-06-22  3:59         ` Linus Torvalds
2012-06-22  7:12       ` Ingo Molnar
2012-06-22  7:41         ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).