The patch titled Subject: migrate_pages: modify max number of pages to migrate in batch has been added to the -mm mm-unstable branch. Its filename is migrate_pages-modify-max-number-of-pages-to-migrate-in-batch.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/migrate_pages-modify-max-number-of-pages-to-migrate-in-batch.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: Zhenneng Li <lizhenneng@xxxxxxxxxx> Subject: migrate_pages: modify max number of pages to migrate in batch Date: Mon, 24 Jun 2024 12:51:20 +0800 We restrict the number of pages to be migrated to no more than HPAGE_PMD_NR or NR_MAX_BATCHED_MIGRATION, but in fact, the number of pages to be migrated may reach 2*HPAGE_PMD_NR-1 or 2 *NR_MAX_BATCHED_MIGRATION-1, it's not in inconsistent with the context. Please refer to commit 42012e0436d4 ("migrate_pages: restrict number of pages to migrate in batch"). Link: https://lkml.kernel.org/r/20240624045120.121261-1-lizhenneng@xxxxxxxxxx Signed-off-by: Zhenneng Li <lizhenneng@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~migrate_pages-modify-max-number-of-pages-to-migrate-in-batch +++ a/mm/migrate.c @@ -1961,7 +1961,7 @@ again: break; } if (nr_pages >= NR_MAX_BATCHED_MIGRATION) - list_cut_before(&folios, from, &folio2->lru); + list_cut_before(&folios, from, &folio->lru); else list_splice_init(from, &folios); if (mode == MIGRATE_ASYNC) _ Patches currently in -mm which might be from lizhenneng@xxxxxxxxxx are migrate_pages-modify-max-number-of-pages-to-migrate-in-batch.patch