Thread (5 messages) 5 messages, 3 authors, 2022-01-17

Re: [PATCH] mm/page_isolation: unset migratetype directly for non Buddy page

From: Oscar Salvador <osalvador@suse.de>
Date: 2021-12-29 14:53:40
Also in: lkml

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 <redacted>
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@suse.de>


-- 
Oscar Salvador
SUSE Labs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help