Commit 6c855fce authored by Hugh Dickins's avatar Hugh Dickins Committed by Linus Torvalds
Browse files

mm/rmap: try_to_migrate() skip zone_device !device_private

I know nothing about zone_device pages and !device_private pages; but if
try_to_migrate_one() will do nothing for them, then it's better that
try_to_migrate() filter them first, than trawl through all their vmas.
Signed-off-by: default avatarHugh Dickins <>
Reviewed-by: default avatarShakeel Butt <>
Reviewed-by: default avatarAlistair Popple <>

Cc: Andrew Morton <>
Cc: Jason Gunthorpe <>
Cc: Ralph Campbell <>
Cc: Christoph Hellwig <>
Cc: Yang Shi <>
Cc: Kirill A. Shutemov <>
Signed-off-by: default avatarLinus Torvalds <>
parent 023e1a8d
......@@ -1703,9 +1703,6 @@ static bool try_to_migrate_one(struct page *page, struct vm_area_struct *vma,
struct mmu_notifier_range range;
enum ttu_flags flags = (enum ttu_flags)(long)arg;
if (is_zone_device_page(page) && !is_device_private_page(page))
return true;
* When racing against e.g. zap_pte_range() on another cpu,
* in between its ptep_get_and_clear_full() and page_remove_rmap(),
......@@ -1944,6 +1941,9 @@ void try_to_migrate(struct page *page, enum ttu_flags flags)
if (is_zone_device_page(page) && !is_device_private_page(page))
* During exec, a temporary VMA is setup and later moved.
* The VMA is moved under the anon_vma lock but not the
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment