函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:memory_bm_create - Allocate memory for a memory bitmap.

函数原型:static int memory_bm_create(struct memory_bitmap *bm, gfp_t gfp_mask, int safe_needed)

返回类型:int

参数:

类型参数名称
struct memory_bitmap *bm
gfp_tgfp_mask
intsafe_needed
651  chain_init( & ca, gfp_mask, safe_needed)
652  初始化链表头
654  error等于reate_mem_extents - Create a list of memory extents.*@list: List to put the extents into.*@gfp_mask: Mask to use for memory allocations.* The extents represent contiguous ranges of PFNs.
655  如果error则返回:error
661  zone等于reate_zone_bm_rtree - Create a radix tree for one zone.* Allocated the mem_zone_bm_rtree structure and initializes it.* This function also allocated and builds the radix tree for the* zone.
663  如果非zone
664  error等于负ENOMEM
665  转到:Error
667  添加链表项
670  list of pages used to store zone bitmap objects and bitmap block objects 等于he chain
671  memory_bm_position_reset(bm)
672  Exit :
673  _mem_extents - Free a list of memory extents.*@list: List of extents to free.
674  返回:error
676  Error :
677  list of pages used to store zone bitmap objects and bitmap block objects 等于he chain
678  memory_bm_free(bm, PG_UNSAFE_CLEAR)
679  转到:Exit
调用者
名称描述
create_basic_memory_bitmapsreate_basic_memory_bitmaps - Create bitmaps to hold basic page information
hibernate_preallocate_memoryhibernate_preallocate_memory - Preallocate memory for hibernation image
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