函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:mpol_misplaced - check whether current page node is valid in policy*@page: page to be checked*@vma: vm area where page mapped*@addr: virtual address where page mapped* Lookup current policy node id for vma,addr and "compare to" page's* node id

函数原型:int mpol_misplaced(struct page *page, struct vm_area_struct *vma, unsigned long addr)

返回类型:int

参数:

类型参数名称
struct page *page
struct vm_area_struct *vma
unsigned longaddr
2408  curnid等于page_to_nid(page)
2410  thiscpu等于These macros fold the SMP functionality into a single CPU system()
2411  thisnid等于cpu_to_node(thiscpu)
2412  polnid等于NUMA_NO_NODE
2413  ret等于负1
2415  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
2416  如果非See set_mempolicy() MPOL_F_* above 按位与his policy wants migrate on fault 的值则转到:out
2420  :See MPOL_* above 恒等于MPOL_INTERLEAVE
2421  pgoff等于Offset (within vm_file) in PAGE_SIZEunits
2422  pgoff加等于addrOur start address within vm_mm. 右移PAGE_SHIFT determines the page size
2423  polnid等于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.
2424  退出
2426  :See MPOL_* above 恒等于MPOL_PREFERRED
2427  如果See set_mempolicy() MPOL_F_* above 按位与preferred local allocation polnid等于Returns the number of the current Node.
2429  否则polnid等于 preferred
2431  退出
2433  :See MPOL_* above 恒等于MPOL_BIND
2441  如果No static inline type checking - see Subtlety (1) above. (curnid, interleave/bind )则转到:out
2443  z等于 - Zoneref pointer for the first suitable zone found (see below)
2447  polnid等于zone_to_nid(Pointer to actual zone )
2448  退出
2450  默认
2451  BUG()
2455  如果See set_mempolicy() MPOL_F_* above 按位与Migrate On protnone Reference On Node
2456  polnid等于thisnid
2458  如果非should_numa_migrate_memory(当前进程, page, curnid, thiscpu)则转到:out
2462  如果curnid不等于polnidret等于polnid
2464  out :
2465  mpol_cond_put(pol)
2467  返回:ret
调用者
名称描述
do_huge_pmd_numa_pageNUMA hinting page fault entry point for trans huge pmds
numa_migrate_prep