Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:pte_alloc_one_map

Proto:static vm_fault_t pte_alloc_one_map(struct vm_fault *vmf)

Type:vm_fault_t

Parameter:

TypeParameterName
struct vm_fault *vmf
3293  vma = Target VMA
3295  If Not pmd_none( * Pointer to pmd entry matching* the 'address' ) Then Go to map_pte
3297  If Pre-allocated pte page table.* vm_ops->map_pages() calls* alloc_set_pte() from atomic context.* do_fault_around() pre-allocates* page table to avoid allocation from* atomic context. Then
3298  Page table lock.* Protects pte page table if 'pte'* is not NULL, otherwise pmd. = pmd_lock(The address space we belong to. , Pointer to pmd entry matching* the 'address' )
3301  Go to map_pte
3304  mm_inc_nr_ptes(The address space we belong to. )
3305  pmd_populate(The address space we belong to. , Pointer to pmd entry matching* the 'address' , Pre-allocated pte page table.* vm_ops->map_pages() calls* alloc_set_pte() from atomic context.* do_fault_around() pre-allocates* page table to avoid allocation from* atomic context.)
3306  spin_unlock(Page table lock.* Protects pte page table if 'pte'* is not NULL, otherwise pmd.)
3307  Pre-allocated pte page table.* vm_ops->map_pages() calls* alloc_set_pte() from atomic context.* do_fault_around() pre-allocates* page table to avoid allocation from* atomic context. = NULL
3308  Else if Value for the false possibility is greater at compile time(pte_alloc(The address space we belong to. , Pointer to pmd entry matching* the 'address' )) Then
3309  Return VM_FAULT_OOM
3311  map_pte :
3323  If The ordering of these checks is important for pmds with _PAGE_DEVMAP set.* If we check pmd_trans_unstable() first we will trip the bad_pmd() check* inside of pmd_none_or_trans_huge_or_clear_bad(). This will end up correctly Then Return VM_FAULT_NOPAGE
3335  Pointer to pte entry matching* the 'address'. NULL if the page* table hasn't been allocated. = pte_offset_map_lock(The address space we belong to. , Pointer to pmd entry matching* the 'address' , Faulting virtual address , & Page table lock.* Protects pte page table if 'pte'* is not NULL, otherwise pmd.)
3337  Return 0
Caller
NameDescribe
alloc_set_ptealloc_set_pte - setup new PTE entry for given page and add reverse page* mapping