The patch titled Subject: mm/rmap: try_to_migrate() skip zone_device !device_private has been added to the -mm tree. Its filename is mm-rmap-try_to_migrate-skip-zone_device-device_private.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/mm-rmap-try_to_migrate-skip-zone_device-device_private.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/mm-rmap-try_to_migrate-skip-zone_device-device_private.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Hugh Dickins <hughd@xxxxxxxxxx> Subject: 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. Link: https://lkml.kernel.org/r/1241d356-8ec9-f47b-a5ec-9b2bf66d242@xxxxxxxxxx Signed-off-by: Hugh Dickins <hughd@xxxxxxxxxx> Reviewed-by: Shakeel Butt <shakeelb@xxxxxxxxxx> Reviewed-by: Alistair Popple <apopple@xxxxxxxxxx> Cc: Christoph Hellwig <hch@xxxxxx> Cc: Jason Gunthorpe <jgg@xxxxxxxxxx> Cc: "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx> Cc: Ralph Campbell <rcampbell@xxxxxxxxxx> Cc: Yang Shi <shy828301@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/rmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/mm/rmap.c~mm-rmap-try_to_migrate-skip-zone_device-device_private +++ a/mm/rmap.c @@ -1702,9 +1702,6 @@ static bool try_to_migrate_one(struct pa 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(), @@ -1943,6 +1940,9 @@ void try_to_migrate(struct page *page, e TTU_SYNC))) return; + if (is_zone_device_page(page) && !is_device_private_page(page)) + return; + /* * During exec, a temporary VMA is setup and later moved. * The VMA is moved under the anon_vma lock but not the _ Patches currently in -mm which might be from hughd@xxxxxxxxxx are mm-rmap-fix-comments-left-over-from-recent-changes.patch mm-rmap-fix-old-bug-munlocking-thp-missed-other-mlocks.patch mm-rmap-fix-new-bug-premature-return-from-page_mlock_one.patch mm-rmap-try_to_migrate-skip-zone_device-device_private.patch fs-mm-fix-race-in-unlinking-swapfile.patch