Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\power\snapshot.c Create Date:2022-07-28 10:01:04
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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

Proto:static unsigned long preallocate_image_pages(unsigned long nr_pages, gfp_t mask)

Type:unsigned long

Parameter:

TypeParameterName
unsigned longnr_pages
gfp_tmask
1523  nr_alloc = 0
1525  When nr_pages > 0 cycle
1528  page = alloc_image_page(mask)
1529  If Not page Then Break
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  If PageHighMem(page) Then Numbers of normal and highmem page frames allocated for hibernation image* before suspending devices.++
1534  Else Numbers of normal and highmem page frames allocated for hibernation image* before suspending devices.++
1536  nr_pages--
1537  nr_alloc++
1540  Return nr_alloc
Caller
NameDescribe
preallocate_image_memory