The quilt patch titled Subject: mm: memory_hotplug: unify Huge/LRU/non-LRU movable folio isolation fix has been removed from the -mm tree. Its filename was mm-memory_hotplug-unify-huge-lru-non-lru-movable-folio-isolation-fix.patch This patch was dropped because it was folded into mm-memory_hotplug-unify-huge-lru-non-lru-movable-folio-isolation.patch ------------------------------------------------------ From: Kefeng Wang <wangkefeng.wang@xxxxxxxxxx> Subject: mm: memory_hotplug: unify Huge/LRU/non-LRU movable folio isolation fix Date: Thu, 29 Aug 2024 23:05:00 +0800 - Use folio_try_get()/folio_put() unconditionally, per David - print current pfn when isolate_folio_to_list fails. - memory hotremove test passed for free/used hugetlb folio Link: https://lkml.kernel.org/r/20240829150500.2599549-1-wangkefeng.wang@xxxxxxxxxx Signed-off-by: Kefeng Wang <wangkefeng.wang@xxxxxxxxxx> Cc: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Cc: David Hildenbrand <david@xxxxxxxxxx> Cc: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> Cc: Miaohe Lin <linmiaohe@xxxxxxxxxx> Cc: Naoya Horiguchi <nao.horiguchi@xxxxxxxxx> Cc: Oscar Salvador <osalvador@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/memory_hotplug.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) --- a/mm/memory_hotplug.c~mm-memory_hotplug-unify-huge-lru-non-lru-movable-folio-isolation-fix +++ a/mm/memory_hotplug.c @@ -1780,7 +1780,6 @@ static void do_migrate_range(unsigned lo for (pfn = start_pfn; pfn < end_pfn; pfn++) { struct page *page; - bool hugetlb; if (!pfn_valid(pfn)) continue; @@ -1811,22 +1810,21 @@ static void do_migrate_range(unsigned lo continue; } - hugetlb = folio_test_hugetlb(folio); - if (!hugetlb) { - folio = folio_get_nontail_page(page); - if (!folio) - continue; - } + if (!folio_try_get(folio)) + continue; + + if (unlikely(page_folio(page) != folio)) + goto put_folio; if (!isolate_folio_to_list(folio, &source)) { if (__ratelimit(&migrate_rs)) { - pr_warn("failed to isolate pfn %lx\n", pfn); + pr_warn("failed to isolate pfn %lx\n", + page_to_pfn(page)); dump_page(page, "isolation failed"); } } - - if (!hugetlb) - folio_put(folio); +put_folio: + folio_put(folio); } if (!list_empty(&source)) { nodemask_t nmask = node_states[N_MEMORY]; _ Patches currently in -mm which might be from wangkefeng.wang@xxxxxxxxxx are mm-remove-migration-for-hugepage-in-isolate_single_pageblock.patch mm-memory_hotplug-remove-head-variable-in-do_migrate_range.patch mm-memory-failure-add-unmap_poisoned_folio.patch mm-memory_hotplug-check-hwpoisoned-page-firstly-in-do_migrate_range.patch mm-migrate-add-isolate_folio_to_list.patch mm-memory_hotplug-unify-huge-lru-non-lru-movable-folio-isolation.patch mm-migrate_device-convert-to-migrate_device_coherent_folio.patch mm-migrate_device-use-a-folio-in-migrate_device_range.patch mm-migrate_device-use-more-folio-in-migrate_device_unmap.patch mm-migrate_device-use-more-folio-in-migrate_device_finalize.patch mm-remove-isolate_lru_page.patch mm-remove-isolate_lru_page-fix.patch mm-remove-putback_lru_page.patch