函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Determine a node number for interleave

函数原型:static inline unsigned interleave_nid(struct mempolicy *pol, struct vm_area_struct *vma, unsigned long addr, int shift)

返回类型:unsigned

参数:

类型参数名称
struct mempolicy *pol
struct vm_area_struct *vma
unsigned longaddr
intshift
1923  如果vma
1933  BUG_ON(shift < PAGE_SHIFT determines the page size )
1934  off等于Offset (within vm_file) in PAGE_SIZEunits 右移shiftPAGE_SHIFT determines the page size
1935  off加等于addrOur start address within vm_mm. 右移shift
1936  返回:Do static interleaving for a VMA with known offset @n. Returns the n'th* node in pol->v.nodes (starting from n=0), wrapping around if n exceeds the* number of present nodes.
1937  否则返回:Do dynamic interleaving for a process
调用者
名称描述
huge_nodehuge_node(@vma, @addr, @gfp_flags, @mpol)*@vma: virtual memory area whose policy is sought*@addr: address in @vma for shared policy lookup and interleave policy*@gfp_flags: for requested zone*@mpol: pointer to mempolicy pointer for reference counted
alloc_pages_vmaalloc_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.