函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\memory.c Create Date:2022-07-27 16:06:45
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

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

函数原型:struct page *vm_normal_page(struct vm_area_struct *vma, unsigned long addr, pte_t pte)

返回类型:struct page

参数:

类型参数名称
struct vm_area_struct *vma
unsigned longaddr
pte_tpte
595  pfn等于pte_pfn(pte)
597  如果IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_ARCH_HAS_PTE_SPECIAL)则
598  如果此条件成立可能性大(为编译器优化)(!pte_special(pte))则转到:check_pfn
600  如果Function pointers to deal with this struct. find_special_page则返回:find_special_page(vma, addr)
602  如果Flags, see mm.h. 按位与Page-ranges managed without "struct page", just pure PFN 按位或Can contain "struct page" and pure PFN pages 的值则返回:NULL
604  如果is_zero_pfn(pfn)则返回:NULL
606  如果pte_devmap(pte)则返回:NULL
609  This function is called to print an error when a bad pte* is found. For example, we might have a PFN-mapped pte in* a region that doesn't allow it.* The calling function must still handle the error.
610  返回:NULL
615  如果此条件成立可能性小(为编译器优化)(Flags, see mm.h. & (Page-ranges managed without "struct page", just pure PFN | Can contain "struct page" and pure PFN pages ))则
617  如果非pfn_valid(pfn)则返回:NULL
619  转到:out
620  否则
623  如果pfn恒等于Offset (within vm_file) in PAGE_SIZEunits off则返回:NULL
625  如果非is_cow_mapping(Flags, see mm.h. )则返回:NULL
630  如果is_zero_pfn(pfn)则返回:NULL
633  check_pfn :
634  如果此条件成立可能性小(为编译器优化)(pfn > highest_memmap_pfn)则
635  This function is called to print an error when a bad pte* is found. For example, we might have a PFN-mapped pte in* a region that doesn't allow it.* The calling function must still handle the error.
636  返回:NULL
643  out :
644  返回:pfn_to_page(pfn)
调用者
名称描述
get_gate_page
copy_one_ptepy one vm_area from one task to the other. Assumes the page tables* already present in the new task to be cleared in the whole range* covered by this vma.
zap_pte_range
do_wp_pageThis routine handles present pages, when users try to write* to a shared page. It is done by copying the page to a new address* and decrementing the shared-page counter for the old page.* Note that this routine assumes that the protection checks have been
do_numa_page
__munlock_pagevec_fillFill 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
change_pte_range
madvise_cold_or_pageout_pte_range
madvise_free_pte_range
queue_pages_pte_rangeScan through pages checking if pages follow certain conditions,* and move them to the pagelist if they do
__collapse_huge_page_isolate
khugepaged_scan_pmd
mc_handle_present_pte
follow_page_pte