[PATCH] Allow migration of mlocked pages
Hugh clarified the role of VM_LOCKED. So we can now implement page migration for mlocked pages. Allow the migration of mlocked pages. This means that try_to_unmap must unmap mlocked pages in the migration case. Signed-off-by: Christoph Lameter <clameter@sgi.com> Acked-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
7b2259b3e5
commit
e6a1530d69
10
mm/migrate.c
10
mm/migrate.c
@@ -616,15 +616,13 @@ static int unmap_and_move(new_page_t get_new_page, unsigned long private,
|
||||
/*
|
||||
* Establish migration ptes or remove ptes
|
||||
*/
|
||||
if (try_to_unmap(page, 1) != SWAP_FAIL) {
|
||||
if (!page_mapped(page))
|
||||
rc = move_to_new_page(newpage, page);
|
||||
} else
|
||||
/* A vma has VM_LOCKED set -> permanent failure */
|
||||
rc = -EPERM;
|
||||
try_to_unmap(page, 1);
|
||||
if (!page_mapped(page))
|
||||
rc = move_to_new_page(newpage, page);
|
||||
|
||||
if (rc)
|
||||
remove_migration_ptes(page, page);
|
||||
|
||||
unlock:
|
||||
unlock_page(page);
|
||||
|
||||
|
Reference in New Issue
Block a user