Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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

Proto:static __always_inline bool __rmqueue_fallback(struct zone *zone, int order, int start_migratetype, unsigned int alloc_flags)

Type:bool

Parameter:

TypeParameterName
struct zone *zone
intorder
intstart_migratetype
unsigned intalloc_flags
2632  min_order = order
2642  If alloc_flags & ALLOC_NOFRAGMENT Then min_order = Huge pages are a constant size
2650  When current_order >= min_order cycle
2652  area = & Write-intensive fields used from the page allocator [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  If fallback_mt == -1 Then Continue
2666  If Not can_steal && start_migratetype == MIGRATE_MOVABLE && current_order > order Then Go to find_smallest
2670  Go to do_steal
2673  Return false
2675  find_smallest :
2676  When current_order < Free memory management - zoned buddy allocator. cycle
2678  area = & Write-intensive fields used from the page allocator [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  If fallback_mt != -1 Then Break
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  Return true
Caller
NameDescribe
__rmqueueDo the hard work of removing an element from the buddy allocator.* Call me with the zone->lock already held.