Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\mlock.c Create Date:2022-07-28 14:45:33
Last Modify:2022-05-23 14:12:58 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Fill up pagevec for __munlock_pagevec using pte walk* The function expects that the struct page corresponding to @start address is* a non-TPH page already pinned and in the @pvec, and that it belongs to @zone

Proto:static unsigned long __munlock_pagevec_fill(struct pagevec *pvec, struct vm_area_struct *vma, struct zone *zone, unsigned long start, unsigned long end)

Type:unsigned long

Parameter:

TypeParameterName
struct pagevec *pvec
struct vm_area_struct *vma
struct zone *zone
unsigned longstart
unsigned longend
386  pte = get_locked_pte(The address space we belong to. , start, & ptl)
388  end = When walking page tables, get the address of the next boundary,* or the end address of the range if that comes earlier. Although no* vma end wraps to 0, rounded up __boundary may wrap to 0 throughout.(start, end)
389  end = p4d_addr_end(start, end)
390  end = pud_addr_end(start, end)
391  end = pmd_addr_end(start, end)
394  start += PAGE_SIZE
395  When start < end cycle
396  struct page * page = NULL
397  pte++
398  If pte_present( * pte) Then 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
404  If Not page || page_zone(page) != zone Then Break
411  If PageTransCompound returns true for both transparent huge pages* and hugetlbfs pages, so it should only be called when it's known* that hugetlbfs pages aren't involved. Then Break
414  get_page(page)
419  start += PAGE_SIZE
420  If Add a page to a pagevec. Returns the number of slots still available. == 0 Then Break
423  pte_unmap_unlock(pte, ptl)
424  Return start
Caller
NameDescribe
munlock_vma_pages_rangemunlock_vma_pages_range() - munlock all pages in the vma range.'*@vma - vma containing range to be munlock()ed.*@start - start address in @vma of the range*@end - end of range in @vma.* For mremap(), munmap() and exit().* Called with @vma VM_LOCKED.