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/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: Hugh Dickins <hughd@google.com>
Reviewed-by: Shakeel Butt <shakeelb@google.com>
Reviewed-by: Alistair Popple <apopple@nvidia.com>
Link: https://lore.kernel.org/lkml/1241d356-8ec9-f47b-a5ec-9b2bf66d242@google.com/
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jason Gunthorpe <jgg@nvidia.com>
Cc: Ralph Campbell <rcampbell@nvidia.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Yang Shi <shy828301@gmail.com>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Hugh Dickins and committed by
Linus Torvalds
6c855fce 023e1a8d

+3 -3
+3 -3
mm/rmap.c
··· 1703 1703 struct mmu_notifier_range range; 1704 1704 enum ttu_flags flags = (enum ttu_flags)(long)arg; 1705 1705 1706 - if (is_zone_device_page(page) && !is_device_private_page(page)) 1707 - return true; 1708 - 1709 1706 /* 1710 1707 * When racing against e.g. zap_pte_range() on another cpu, 1711 1708 * in between its ptep_get_and_clear_full() and page_remove_rmap(), ··· 1939 1942 */ 1940 1943 if (WARN_ON_ONCE(flags & ~(TTU_RMAP_LOCKED | TTU_SPLIT_HUGE_PMD | 1941 1944 TTU_SYNC))) 1945 + return; 1946 + 1947 + if (is_zone_device_page(page) && !is_device_private_page(page)) 1942 1948 return; 1943 1949 1944 1950 /*