函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\mempolicy.c Create Date:2022-07-27 17:06:13
Last Modify:2020-03-17 22:28:11 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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.

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

返回类型:struct page

参数:

类型参数名称
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  如果See MPOL_* above 恒等于MPOL_INTERLEAVE
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  转到:out
2132  如果此条件成立可能性小(为编译器优化)(IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_TRANSPARENT_HUGEPAGE) && hugepage)则
2133  hpage_node等于node
2145  如果See MPOL_* above 恒等于MPOL_PREFERRED且非See set_mempolicy() MPOL_F_* above 按位与preferred local allocation 的值则hpage_node等于 preferred
2148  nmask等于Return a nodemask representing a mempolicy for filtering nodes for* page allocation
2150  mpol_cond_put(pol)
2168  转到: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  返回:page