On Wed, Dec 29, 2021 at 11:36:49AM +0800, Chen Wandun wrote: > There is no need to try to move_freepages_block for pages that is not > in buddy in function unset_migratetype_isolate, it can directly set > migrate type. The above could benefit from some rephrasing, someting along these lines maybe? "In unset_migratetype_isolate(), we can bypass the call to move_freepages_block() for non-buddy pages" > > It will save a few cpu cycles for some situations such as cma and > hugetlb when allocating continue pages, in these situation function > alloc_contig_pages will be called. > > alloc_contig_pages > __alloc_contig_migrate_range > isolate_freepages_range ==> pages has been remove from buddy > undo_isolate_page_range > unset_migratetype_isolate ==> can directly set migratetype > > Fixes: 3c605096d315 ("mm/page_alloc: restrict max order of merging on isolated pageblock") > Signed-off-by: Chen Wandun <chenwandun@xxxxxxxxxx> I am ok with the "fix", but I don't think this deserves a Fixes tag. Sure, it can spare some cpu cycles, but besides that, there is no harm in the actual code unless I missed something. Others might feel stronger about that. Reviewed-by: Oscar Salvador <osalvador@xxxxxxx> -- Oscar Salvador SUSE Labs