函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\mlock.c Create Date:2022-07-27 16:13:10
Last Modify:2022-05-23 14:12:58 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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

函数原型:static unsigned long __munlock_pagevec_fill(struct pagevec *pvec, struct vm_area_struct *vma, struct zone *zone, unsigned long start, unsigned long end)

返回类型:unsigned long

参数:

类型参数名称
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 start小于end循环
396  struct page * page = NULL
397  pte自加
398  如果pte_present( * pte)则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  如果非pagepage_zone(page)不等于zone退出
411  如果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.退出
414  get_page(page)
419  start加等于PAGE_SIZE
420  如果Add a page to a pagevec. Returns the number of slots still available.恒等于0则退出
423  pte_unmap_unlock(pte, ptl)
424  返回:start
调用者
名称描述
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.