Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\page_alloc.c Create Date:2022-07-28 15:04:24
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Check whether there is a suitable fallback freepage with requested order.* If only_stealable is true, this function returns fallback_mt only if* we can steal other freepages all together. This would help to reduce

Proto:int find_suitable_fallback(struct free_area *area, unsigned int order, int migratetype, bool only_stealable, bool *can_steal)

Type:int

Parameter:

TypeParameterName
struct free_area *area
unsigned intorder
intmigratetype
boolonly_stealable
bool *can_steal
2473  If nr_free == 0 Then Return -1
2476  * can_steal = false
2477  cycle
2478  fallback_mt = This array describes the order lists are fallen back to when* the free lists for the desirable migrate type are depleted[migratetype][i]
2479  If fallback_mt == MIGRATE_TYPES Then Break
2482  If free_area_empty(area, fallback_mt) Then Continue
2485  If When we are falling back to another migratetype during allocation, try to* steal extra free pages from the same pageblocks to satisfy further* allocations, instead of polluting multiple pageblocks Then * can_steal = true
2488  If Not only_stealable Then Return fallback_mt
2491  If can_steal Then Return fallback_mt
2495  Return -1
Caller
NameDescribe
__rmqueue_fallbackTry finding a free buddy page on the fallback list and put it on the free* list of requested migratetype, possibly along with other pages from the same* block, depending on fragmentation avoidance heuristics. Returns true if