mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-11 17:10:13 +00:00
mm/page_alloc: add some detailed comments in can_steal_fallback
[akpm@linux-foundation.org: tweak grammar, fit to 80 cols] Link: https://lkml.kernel.org/r/20240920122030.159751-1-gxxa03070307@gmail.com Signed-off-by: gaoxiang17 <gaoxiang17@xiaomi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
5f1c8108e7
commit
6025ea5abb
@ -1855,6 +1855,14 @@ static bool can_steal_fallback(unsigned int order, int start_mt)
|
||||
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 compaction may occur to form large contiguous pages,
|
||||
* and the next movable allocation may not need to steal. Unmovable and
|
||||
* reclaimable allocations need to actually steal pages.
|
||||
*/
|
||||
if (order >= pageblock_order / 2 ||
|
||||
start_mt == MIGRATE_RECLAIMABLE ||
|
||||
start_mt == MIGRATE_UNMOVABLE ||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user