Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:queue_pages_pmd() has four possible return values:* 0 - pages are placed on the right node or queued successfully

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

Type:int

Parameter:

TypeParameterName
pmd_t *pmd
spinlock_t *ptl
unsigned longaddr
unsigned longend
struct mm_walk *walk
446  ret = 0
448  qp = private
451  If Value for the false possibility is greater at compile time(is_pmd_migration_entry( * pmd)) Then
452  ret = -EIO
453  Go to unlock
455  page = Currently stuck as a macro due to indirect forward reference to* linux/mmzone.h's __section_mem_map_addr() definition:( * pmd)
456  If is_huge_zero_page(page) Then
457  spin_unlock(ptl)
458  __split_huge_pmd(vma, pmd, addr, TSC's on different sockets may be reset asynchronously.* This may cause the TSC ADJUST value on socket 0 to be NOT 0., NULL)
459  ret = 2
460  Go to out
462  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 Go to unlock
465  flags = flags
467  If flags & (Move pages owned by this process to conformto policy | Move every page to conform to policy ) Then
470  ret = 1
471  Go to unlock
473  Else ret = -EIO
475  unlock :
476  spin_unlock(ptl)
477  out :
478  Return ret
Caller
NameDescribe
queue_pages_pte_rangeScan through pages checking if pages follow certain conditions,* and move them to the pagelist if they do