The patch titled Subject: mm/page_alloc: add some detailed comments in can_steal_fallback has been added to the -mm mm-unstable branch. Its filename is mm-page_alloc-add-some-detailed-comments-in-can_steal_fallback.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-page_alloc-add-some-detailed-comments-in-can_steal_fallback.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: gaoxiang17 <gaoxiang17@xxxxxxxxxx> Subject: mm/page_alloc: add some detailed comments in can_steal_fallback Date: Fri, 20 Sep 2024 20:20:30 +0800 Link: https://lkml.kernel.org/r/20240920122030.159751-1-gxxa03070307@xxxxxxxxx Signed-off-by: gaoxiang17 <gaoxiang17@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/page_alloc.c | 7 +++++++ 1 file changed, 7 insertions(+) --- a/mm/page_alloc.c~mm-page_alloc-add-some-detailed-comments-in-can_steal_fallback +++ a/mm/page_alloc.c @@ -1853,6 +1853,13 @@ static bool can_steal_fallback(unsigned if (order >= pageblock_order) return true; + /* + * movable pages won't cause permanent fragmentation, so when you alloc small pages, + * you just need to temporarily steal unmovable or reclaimable pages that are closest + * to the request size. After a while, memory compact may occur to form large contiguous + * pages, and the next movable allocation may not need to steal. Unmovable and reclaimable + * allocation need to actually steal pages. + */ if (order >= pageblock_order / 2 || start_mt == MIGRATE_RECLAIMABLE || start_mt == MIGRATE_UNMOVABLE || _ Patches currently in -mm which might be from gaoxiang17@xxxxxxxxxx are mm-page_alloc-add-some-detailed-comments-in-can_steal_fallback.patch