函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\page_alloc.c Create Date:2022-07-27 16:34:29
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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

函数原型:int find_suitable_fallback(struct free_area *area, unsigned int order, int migratetype, bool only_stealable, bool *can_steal)

返回类型:int

参数:

类型参数名称
struct free_area *area
unsigned intorder
intmigratetype
boolonly_stealable
bool *can_steal
2473  如果nr_free恒等于0则返回:负1
2476  * can_steal = false
2477  循环
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  如果fallback_mt恒等于MIGRATE_TYPES退出
2482  如果free_area_empty(area, fallback_mt)则继续下一循环
2485  如果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则 * can_steal = true
2488  如果非only_stealable则返回:fallback_mt
2491  如果can_steal则返回:fallback_mt
2495  返回:负1
调用者
名称描述
__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