函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:memory_bm_rtree_next_pfn - Find the next set bit in a memory bitmap.*@bm: Memory bitmap.* Starting from the last returned position this function searches for the next* set bit in @bm and returns the PFN represented by it. If no more bits are

函数原型:static unsigned long memory_bm_next_pfn(struct memory_bitmap *bm)

返回类型:unsigned long

参数:

类型参数名称
struct memory_bitmap *bm
887  循环
888  pages等于Zone end page frame + 1 Zone start page frame
889  bits等于两数取小(pages - node_pfn, BM_BITS_PER_BLOCK)
890  bit等于在内存区域中找到下一个设置位
892  如果bit小于bits
894  node_bit等于bit加1
895  返回:pfn
897 ree_next_node - Jump to the next leaf node.* Set the position to the beginning of the next node in the* memory bitmap. This is either the next node in the current* zone's radix tree or the first node in the radix tree of the* next zone.循环
899  返回:Data types related to memory bitmaps
调用者
名称描述
clear_free_pages
copy_data_pages
swsusp_freeswsusp_free - Free pages allocated for hibernation image.* Image pages are alocated before snapshot creation, so they need to be* released after resume.
free_unnecessary_pages_unnecessary_pages - Release preallocated pages not needed for the image.
pack_pfnspack_pfns - Prepare PFNs for saving.*@bm: Memory bitmap.*@buf: Memory buffer to store the PFNs in.* PFNs corresponding to set bits in @bm are stored in the area of memory* pointed to by @buf (1 page at a time).
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
duplicate_memory_bitmap
mark_unsafe_pagesmark_unsafe_pages - Mark pages that were used before hibernation.* Mark the pages that cannot be used for storing the image during restoration,* because they conflict with the pages that had been used before hibernation.
get_bufferget_buffer - Get the address to store the next image data page.* Get the address that snapshot_write_next() should return to its caller to* write to.