函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Move the free pages in a range to the free lists of the requested type.* Note that start_page and end_pages are not aligned on a pageblock* boundary. If alignment is required, use move_freepages_block()

函数原型:static int move_freepages(struct zone *zone, struct page *start_page, struct page *end_page, int migratetype, int *num_movable)

返回类型:int

参数:

类型参数名称
struct zone *zone
struct page *start_page
struct page *end_page
intmigratetype
int *num_movable
2243  pages_moved等于0
2245 page小于等于end_page循环
2246  如果非pfn_valid_within(page_to_pfn(page))则
2247  page自加
2248  继续下一循环
2257  如果num_movablePageLRU(page)或__PageMovable(page)的值则num_movable自加
2261  page自加
2262  继续下一循环
2266  VM_BUG_ON_PAGE(page_to_nid(page) != zone_to_nid(zone), page)
2267  VM_BUG_ON_PAGE(page_zone(page) != zone, page)
2269  order等于page_order(page)
2270  Used for pages which are on another list
2271  page加等于1左移order
2272  pages_moved加等于1左移order
2275  返回:pages_moved
调用者
名称描述
move_freepages_block