Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\memory.c Create Date:2022-07-28 14:40:00
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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

Proto:struct page *vm_normal_page(struct vm_area_struct *vma, unsigned long addr, pte_t pte)

Type:struct page

Parameter:

TypeParameterName
struct vm_area_struct *vma
unsigned longaddr
pte_tpte
595  pfn = pte_pfn(pte)
597  If IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_ARCH_HAS_PTE_SPECIAL) Then
598  If Value is more likely to compile time(!pte_special(pte)) Then Go to check_pfn
600  If Function pointers to deal with this struct. && find_special_page Then Return find_special_page(vma, addr)
602  If Flags, see mm.h. & (Page-ranges managed without "struct page", just pure PFN | Can contain "struct page" and pure PFN pages ) Then Return NULL
604  If is_zero_pfn(pfn) Then Return NULL
606  If pte_devmap(pte) Then Return 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  Return NULL
615  If Value for the false possibility is greater at compile time(Flags, see mm.h. & (Page-ranges managed without "struct page", just pure PFN | Can contain "struct page" and pure PFN pages )) Then
617  If Not pfn_valid(pfn) Then Return NULL
619  Go to out
620  Else
623  If pfn == Offset (within vm_file) in PAGE_SIZEunits + off Then Return NULL
625  If Not is_cow_mapping(Flags, see mm.h. ) Then Return NULL
630  If is_zero_pfn(pfn) Then Return NULL
633  check_pfn :
634  If Value for the false possibility is greater at compile time(pfn > highest_memmap_pfn) Then
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  Return NULL
643  out :
644  Return pfn_to_page(pfn)
Caller
NameDescribe
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