Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\mempolicy.c Create Date:2022-07-28 15:33:04
Last Modify:2020-03-17 22:28:11 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:alloc_pages_vma - Allocate a page for a VMA.*@gfp:* %GFP_USER user allocation.* %GFP_KERNEL kernel allocations,* %GFP_HIGHMEM highmem/user allocations,* %GFP_FS allocation should not call back into a file system.* %GFP_ATOMIC don't sleep.

Proto:struct page *alloc_pages_vma(gfp_t gfp, int order, struct vm_area_struct *vma, unsigned long addr, int node, bool hugepage)

Type:struct page

Parameter:

TypeParameterName
gfp_tgfp
intorder
struct vm_area_struct *vma
unsigned longaddr
intnode
boolhugepage
2121  pol = get_vma_policy(@vma, @addr)*@vma: virtual memory area whose policy is sought*@addr: address in @vma for shared policy lookup* Returns effective policy for a VMA at specified address
2123  If See MPOL_* above == MPOL_INTERLEAVE Then
2126  nid = Determine a node number for interleave
2127  mpol_cond_put(pol)
2128  page = Allocate a page in interleaved policy.Own path because it needs to do special accounting.
2129  Go to out
2132  If Value for the false possibility is greater at compile time(IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_TRANSPARENT_HUGEPAGE) && hugepage) Then
2133  hpage_node = node
2145  If See MPOL_* above == MPOL_PREFERRED && Not (See set_mempolicy() MPOL_F_* above & preferred local allocation ) Then hpage_node = preferred
2148  nmask = Return a nodemask representing a mempolicy for filtering nodes for* page allocation
2150  mpol_cond_put(pol)
2168  Go to out
2172  nmask = Return a nodemask representing a mempolicy for filtering nodes for* page allocation
2173  preferred_nid = Return the node id preferred by the given mempolicy, or the given id
2174  page = This is the 'heart' of the zoned buddy allocator.
2175  mpol_cond_put(pol)
2176  out :
2177  Return page