The patch titled Subject: mm: __first_valid_page skip over offline pages has been removed from the -mm tree. Its filename was mm-__first_valid_page-skip-over-offline-pages.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Michal Hocko <mhocko@xxxxxxxx> Subject: mm: __first_valid_page skip over offline pages __first_valid_page skips over invalid pfns in the range but it might still stumble over offline pages. At least start_isolate_page_range will mark those set_migratetype_isolate. This doesn't represent any immediate AFAICS because alloc_contig_range will fail to isolate those pages but it relies on not fully initialized page which will become a problem later when we stop associating offline pages to zones. Use pfn_to_online_page to handle this. This is more a preparatory patch than a fix. Link: http://lkml.kernel.org/r/20170515085827.16474-10-mhocko@xxxxxxxxxx Signed-off-by: Michal Hocko <mhocko@xxxxxxxx> Acked-by: Vlastimil Babka <vbabka@xxxxxxx> Cc: Andi Kleen <ak@xxxxxxxxxxxxxxx> Cc: Andrea Arcangeli <aarcange@xxxxxxxxxx> Cc: Balbir Singh <bsingharora@xxxxxxxxx> Cc: Dan Williams <dan.j.williams@xxxxxxxxx> Cc: Daniel Kiper <daniel.kiper@xxxxxxxxxx> Cc: David Rientjes <rientjes@xxxxxxxxxx> Cc: Heiko Carstens <heiko.carstens@xxxxxxxxxx> Cc: Igor Mammedov <imammedo@xxxxxxxxxx> Cc: Jerome Glisse <jglisse@xxxxxxxxxx> Cc: Joonsoo Kim <js1304@xxxxxxxxx> Cc: Martin Schwidefsky <schwidefsky@xxxxxxxxxx> Cc: Mel Gorman <mgorman@xxxxxxx> Cc: Reza Arbab <arbab@xxxxxxxxxxxxxxxxxx> Cc: Tobias Regnery <tobias.regnery@xxxxxxxxx> Cc: Toshi Kani <toshi.kani@xxxxxxx> Cc: Vitaly Kuznetsov <vkuznets@xxxxxxxxxx> Cc: Xishi Qiu <qiuxishi@xxxxxxxxxx> Cc: Yasuaki Ishimatsu <isimatu.yasuaki@xxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/page_isolation.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff -puN mm/page_isolation.c~mm-__first_valid_page-skip-over-offline-pages mm/page_isolation.c --- a/mm/page_isolation.c~mm-__first_valid_page-skip-over-offline-pages +++ a/mm/page_isolation.c @@ -138,12 +138,18 @@ static inline struct page * __first_valid_page(unsigned long pfn, unsigned long nr_pages) { int i; - for (i = 0; i < nr_pages; i++) - if (pfn_valid_within(pfn + i)) - break; - if (unlikely(i == nr_pages)) - return NULL; - return pfn_to_page(pfn + i); + + for (i = 0; i < nr_pages; i++) { + struct page *page; + + if (!pfn_valid_within(pfn + i)) + continue; + page = pfn_to_online_page(pfn + i); + if (!page) + continue; + return page; + } + return NULL; } /* @@ -184,8 +190,12 @@ int start_isolate_page_range(unsigned lo undo: for (pfn = start_pfn; pfn < undo_pfn; - pfn += pageblock_nr_pages) - unset_migratetype_isolate(pfn_to_page(pfn), migratetype); + pfn += pageblock_nr_pages) { + struct page *page = pfn_to_online_page(pfn); + if (!page) + continue; + unset_migratetype_isolate(page, migratetype); + } return -EBUSY; } _ Patches currently in -mm which might be from mhocko@xxxxxxxx are mm-make-pr_set_thp_disable-immediately-active.patch mm-memory_hotplug-simplify-empty-node-mask-handling-in-new_node_page.patch hugetlb-memory_hotplug-prefer-to-use-reserved-pages-for-migration.patch mm-unify-new_node_page-and-alloc_migrate_target.patch mm-memcg-fix-potential-undefined-behavior-in-mem_cgroup_event_ratelimit.patch mm-hugetlb-unclutter-hugetlb-allocation-layers.patch hugetlb-add-support-for-preferred-node-to-alloc_huge_page_nodemask.patch mm-hugetlb-soft_offline-use-new_page_nodemask-for-soft-offline-migration.patch mm-document-highmem_is_dirtyable-sysctl.patch mm-mm-mmap-do-not-blow-on-prot_none-map_fixed-holes-in-the-stack.patch mm-disallow-early_pfn_to_nid-on-configurations-which-do-not-implement-it.patch lib-rhashtablec-use-kvzalloc-in-bucket_table_alloc-when-possible.patch netfilter-use-kvmalloc-xt_alloc_table_info.patch mips-do-not-use-__gfp_repeat-for-order-0-request.patch mm-tree-wide-replace-__gfp_repeat-by-__gfp_retry_mayfail-with-more-useful-semantic.patch mm-tree-wide-replace-__gfp_repeat-by-__gfp_retry_mayfail-with-more-useful-semantic-fix-2.patch xfs-map-km_mayfail-to-__gfp_retry_mayfail.patch mm-kvmalloc-support-__gfp_retry_mayfail-for-all-sizes.patch drm-i915-use-__gfp_retry_mayfail.patch mm-migration-do-not-trigger-oom-killer-when-migrating-memory.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html