函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:static void steal_suitable_fallback(struct zone *zone, struct page *page, unsigned int alloc_flags, int start_type, bool whole_block)

返回类型:void

参数:

类型参数名称
struct zone *zone
struct page *page
unsigned intalloc_flags
intstart_type
boolwhole_block
2385  current_order等于page_order(page)
2390  old_block_type等于get_pageblock_migratetype(page)
2396  如果is_migrate_highatomic(old_block_type)则转到:single_page
2400  如果current_order大于等于Huge pages are a constant size
2401  change_pageblock_range(page, current_order, start_type)
2402  转到:single_page
2410  boost_watermark(zone)
2411  如果alloc_flags按位与allow waking of kswapd 设置内存位
2415  如果非whole_block则转到:single_page
2418  free_pages等于move_freepages_block(zone, page, start_type, & movable_pages)
2425  如果start_type恒等于MIGRATE_MOVABLE
2426  alike_pages等于movable_pages
2427  否则
2435  如果old_block_type恒等于MIGRATE_MOVABLEalike_pages等于pageblock_nr_pagesfree_pagesmovable_pages
2438  否则alike_pages等于0
2443  如果非free_pages则转到:single_page
2450  如果free_pagesalike_pages大于等于1左移Huge pages are a constant size 减1位或page_group_by_mobility_disabledset_pageblock_migratetype(page, start_type)
2454  返回
2456  single_page :
2457  area等于伙伴系统空闲内存页[current_order]
2458  Used for pages which are on another list
调用者
名称描述
__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