函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:static __always_inline bool __rmqueue_fallback(struct zone *zone, int order, int start_migratetype, unsigned int alloc_flags)

返回类型:bool

参数:

类型参数名称
struct zone *zone
intorder
intstart_migratetype
unsigned intalloc_flags
2632  min_order等于order
2642  如果alloc_flags按位与ALLOC_NOFRAGMENTmin_order等于Huge pages are a constant size
2650 current_order大于等于min_order循环
2652  area等于伙伴系统空闲内存页[current_order]的地址
2653  fallback_mt等于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
2655  如果fallback_mt恒等于负1则继续下一循环
2666  如果非can_stealstart_migratetype恒等于MIGRATE_MOVABLEcurrent_order大于order则转到:find_smallest
2670  转到:do_steal
2673  返回:false
2675  find_smallest :
2676 current_order小于Free memory management - zoned buddy allocator. 循环
2678  area等于伙伴系统空闲内存页[current_order]的地址
2679  fallback_mt等于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
2681  如果fallback_mt不等于负1则退出
2689  VM_BUG_ON(current_order == Free memory management - zoned buddy allocator. )
2691  do_steal :
2692  page等于get_page_from_free_area(area, fallback_mt)
2694  This function implements actual steal behaviour. If order is large enough,* we can steal whole pageblock. If not, we first move freepages in this* pageblock to our migratetype and determine how many already-allocated pages
2697  trace_mm_page_alloc_extfrag(page, order, current_order, start_migratetype, fallback_mt)
2700  返回:true
调用者
名称描述
__rmqueueDo the hard work of removing an element from the buddy allocator.* Call me with the zone->lock already held.