函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Scan through pages checking if pages follow certain conditions,* and move them to the pagelist if they do

函数原型:static int queue_pages_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end, struct mm_walk *walk)

返回类型:int

参数:

类型参数名称
pmd_t *pmd
unsigned longaddr
unsigned longend
struct mm_walk *walk
495  vma等于vma
497  qp等于private
498  flags等于flags
500  bool has_unmovable = false
504  ptl等于mmap_sem must be held on entry
505  如果ptl
506  ret等于queue_pages_pmd() has four possible return values:* 0 - pages are placed on the right node or queued successfully
507  如果ret不等于2则返回:ret
512  如果This is a noop if Transparent Hugepage Support is not built into* the kernel则返回:0
515  pte等于pte_offset_map_lock(mm, pmd, addr, & ptl)
516 addr不等于end循环
517  如果非pte_present( * pte)则继续下一循环
519  page等于vm_normal_page -- This function gets the "struct page" associated with a pte.* "Special" mappings do not wish to be associated with a "struct page" (either* it doesn't exist, or it exists but they don't want to touch it). In this
520  如果非page则继续下一循环
526  如果PageReserved(page)则继续下一循环
528  如果非Check if the page's nid is in qp->nmask.* If MPOL_MF_INVERT is set in qp->flags, check if the nid is* in the invert of qp->nmask.则继续下一循环
532  如果非Check if a vma is migratable
533  has_unmovable = true
534  退出
544  否则退出
547  pte_unmap_unlock(pte - 1, ptl)
548  cond_resched()
550  如果has_unmovable则返回:1
553  返回:如果addr不等于end则负EIO否则0