Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\percpu-vm.c Create Date:2022-07-28 14:27:02
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:pcpu_populate_chunk - populate and map an area of a pcpu_chunk*@chunk: chunk of interest*@page_start: the start page*@page_end: the end page*@gfp: allocation flags passed to the underlying memory allocator* For each cpu, populate and map pages

Proto:static int pcpu_populate_chunk(struct pcpu_chunk *chunk, int page_start, int page_end, gfp_t gfp)

Type:int

Parameter:

TypeParameterName
struct pcpu_chunk *chunk
intpage_start
intpage_end
gfp_tgfp
280  pages = pcpu_get_pages - get temp pages array* Returns pointer to array of pointers to struct page which can be indexed* with pcpu_page_idx(). Note that there is only one array and accesses* should be serialized by pcpu_alloc_mutex.* RETURNS:
281  If Not pages Then Return -ENOMEM
284  If pcpu_alloc_pages - allocates pages for @chunk*@chunk: target chunk*@pages: array to put the allocated pages into, indexed by pcpu_page_idx()*@page_start: page index of the first page to be allocated*@page_end: page index of the last page to be allocated + Then Return -ENOMEM
287  If pcpu_map_pages - map pages into a pcpu_chunk*@chunk: chunk of interest*@pages: pages array containing pages to be mapped*@page_start: page index of the first page to map*@page_end: page index of the last page to map + 1 Then
288  pcpu_free_pages - free pages which were allocated for @chunk*@chunk: chunk pages were allocated for*@pages: array of pages to be freed, indexed by pcpu_page_idx()*@page_start: page index of the first page to be freed*@page_end: page index of the last page
289  Return -ENOMEM
291  pcpu_post_map_flush - flush cache after mapping*@chunk: pcpu_chunk the regions to be flushed belong to*@page_start: page index of the first page to be flushed*@page_end: page index of the last page to be flushed + 1
293  Return 0