The patch titled Subject: mm: remove redundant condition for THP folio has been added to the -mm mm-unstable branch. Its filename is mm-remove-redundant-condition-for-thp-folio.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-remove-redundant-condition-for-thp-folio.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm 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 via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Dev Jain <dev.jain@xxxxxxx> Subject: mm: remove redundant condition for THP folio Date: Fri, 18 Oct 2024 15:11:51 +0530 folio_test_pmd_mappable() implies folio_test_large(), therefore, simplify the expression for is_thp. Link: https://lkml.kernel.org/r/20241018094151.3458-1-dev.jain@xxxxxxx Signed-off-by: Dev Jain <dev.jain@xxxxxxx> Reviewed-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> Acked-by: David Hildenbrand <david@xxxxxxxxxx> Reviewed-by: Zi Yan <ziy@xxxxxxxxxx> Cc: "Huang, Ying" <ying.huang@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/migrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/mm/migrate.c~mm-remove-redundant-condition-for-thp-folio +++ a/mm/migrate.c @@ -1732,7 +1732,7 @@ static int migrate_pages_batch(struct li list_for_each_entry_safe(folio, folio2, from, lru) { is_large = folio_test_large(folio); - is_thp = is_large && folio_test_pmd_mappable(folio); + is_thp = folio_test_pmd_mappable(folio); nr_pages = folio_nr_pages(folio); cond_resched(); _ Patches currently in -mm which might be from dev.jain@xxxxxxx are mm-abstract-thp-allocation.patch mm-allocate-thp-on-hugezeropage-wp-fault.patch mm-remove-redundant-condition-for-thp-folio.patch