Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mm, mempolicy: fix mbind() to do synchronous migration

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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

David Rientjes and committed by
Linus Torvalds
c4c0e9e5 0e3534c0

+1 -1
+1 -1
mm/mempolicy.c
··· 1177 1177 if (!list_empty(&pagelist)) { 1178 1178 nr_failed = migrate_pages(&pagelist, new_vma_page, 1179 1179 (unsigned long)vma, 1180 - false, true); 1180 + false, MIGRATE_SYNC); 1181 1181 if (nr_failed) 1182 1182 putback_lru_pages(&pagelist); 1183 1183 }