函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:preallocate_image_pages - Allocate a number of pages for hibernation image.*@nr_pages: Number of page frames to allocate.*@mask: GFP flags to use for the allocation.* Return value: Number of page frames actually allocated

函数原型:static unsigned long preallocate_image_pages(unsigned long nr_pages, gfp_t mask)

返回类型:unsigned long

参数:

类型参数名称
unsigned longnr_pages
gfp_tmask
1523  nr_alloc等于0
1525 nr_pages大于0循环
1528  page等于alloc_image_page(mask)
1529  如果非page退出
1531  memory_bm_set_bit( & Memory bitmap used during hibernation for marking allocated page frames that* will contain copies of saveable pages. During restore it is initially used* for marking hibernation image pages, but then the set bits from it are, page_to_pfn(page))
1532  如果PageHighMem(page)则Numbers of normal and highmem page frames allocated for hibernation image* before suspending devices.自加
1534  否则Numbers of normal and highmem page frames allocated for hibernation image* before suspending devices.自加
1536  nr_pages自减
1537  nr_alloc自加
1540  返回:nr_alloc
调用者
名称描述
preallocate_image_memory