函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:get_image_page - Allocate a page for a hibernation image

函数原型:static void *get_image_page(gfp_t gfp_mask, int safe_needed)

返回类型:void

参数:

类型参数名称
gfp_tgfp_mask
intsafe_needed
160  res等于get_zeroed_page(gfp_mask)
161  如果safe_needed则当resswsusp_page_is_free(virt_to_page(kaddr) returns a valid pointer if and only if* virt_addr_valid(kaddr) returns true.(res))循环
164  swsusp_set_page_forbidden(virt_to_page(kaddr) returns a valid pointer if and only if* virt_addr_valid(kaddr) returns true.(res))
165  allocated_unsafe_pages自加
166  res等于get_zeroed_page(gfp_mask)
168  如果res
169  swsusp_set_page_forbidden(virt_to_page(kaddr) returns a valid pointer if and only if* virt_addr_valid(kaddr) returns true.(res))
170  Each page frame allocated for creating the image is marked by setting the* corresponding bits in forbidden_pages_map and free_pages_map simultaneously
172  返回:res
调用者
名称描述
__get_safe_page
chain_alloc
alloc_rtree_nodealloc_rtree_node - Allocate a new node and add it to the radix tree.* This function is used to allocate inner nodes as well as the* leave nodes of the radix tree. It also adds the node to the* corresponding linked list passed in by the *list parameter.
snapshot_read_nextsnapshot_read_next - Get the address to read the next image page from.*@handle: Snapshot handle to be used for the reading.* On the first call, @handle should point to a zeroed snapshot_handle* structure
prepare_imageprepare_image - Make room for loading hibernation image
snapshot_write_nextsnapshot_write_next - Get the address to store the next image page.*@handle: Snapshot handle structure to guide the writing.* On the first call, @handle should point to a zeroed snapshot_handle* structure