Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Scan through pages checking if pages follow certain conditions,* and move them to the pagelist if they do

Proto:static int queue_pages_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end, struct mm_walk *walk)

Type:int

Parameter:

TypeParameterName
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  If ptl Then
506  ret = queue_pages_pmd() has four possible return values:* 0 - pages are placed on the right node or queued successfully
507  If ret != 2 Then Return ret
512  If This is a noop if Transparent Hugepage Support is not built into* the kernel Then Return 0
515  pte = pte_offset_map_lock(mm, pmd, addr, & ptl)
516  When addr != end cycle
517  If Not pte_present( * pte) Then Continue
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  If Not page Then Continue
526  If PageReserved(page) Then Continue
528  If Not 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. Then Continue
533  has_unmovable = true
534  Break
544  Else Break
547  pte_unmap_unlock(pte - 1, ptl)
548  cond_resched()
550  If has_unmovable Then Return 1
553  Return If addr != end Then -EIO Else 0