函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:do_numa_page

函数原型:static vm_fault_t do_numa_page(struct vm_fault *vmf)

返回类型:vm_fault_t

参数:

类型参数名称
struct vm_fault *vmf
3816  vma等于Target VMA
3817  struct page * page = NULL
3818  page_nid等于NUMA_NO_NODE
3821  bool migrated = false
3823  was_writable等于pte_savedwrite(Value of PTE at the time of fault )
3824  flags等于0
3831  Page table lock.* Protects pte page table if 'pte'* is not NULL, otherwise pmd.等于pte_lockptr(The address space we belong to. , Pointer to pmd entry matching* the 'address' )
3832  加自旋锁
3833  如果此条件成立可能性小(为编译器优化)(!pte_same( * Pointer to pte entry matching* the 'address'. NULL if the page* table hasn't been allocated., Value of PTE at the time of fault ))则
3834  pte_unmap_unlock(Pointer to pte entry matching* the 'address'. NULL if the page* table hasn't been allocated., Page table lock.* Protects pte page table if 'pte'* is not NULL, otherwise pmd.)
3835  转到:out
3842  old_pte等于Start a pte protection read-modify-write transaction, which* protects against asynchronous hardware modifications to the pte
3843  pte等于pte_modify(old_pte, Access permissions of this VMA. )
3844  pte等于pte_mkyoung(pte)
3845  如果was_writablepte等于pte_mkwrite(pte)
3847  Commit an update to a pte, leaving any hardware-controlled bits in* the PTE unmodified.
3848  The x86 doesn't have any external MMU info: the kernel page* tables contain all the necessary information.
3850  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
3851  如果非page
3852  pte_unmap_unlock(Pointer to pte entry matching* the 'address'. NULL if the page* table hasn't been allocated., Page table lock.* Protects pte page table if 'pte'* is not NULL, otherwise pmd.)
3853  返回:0
3857  如果PageCompound(page)则
3858  pte_unmap_unlock(Pointer to pte entry matching* the 'address'. NULL if the page* table hasn't been allocated., Page table lock.* Protects pte page table if 'pte'* is not NULL, otherwise pmd.)
3859  返回:0
3870  如果非pte_write(pte)则flags或等于TNF_NO_GROUP
3877  如果page_mapcount(page)大于1且Flags, see mm.h. 按位与VM_SHAREDflags或等于TNF_SHARED
3880  last_cpupid等于page_cpupid_last(page)
3881  page_nid等于page_to_nid(page)
3882  target_nid等于numa_migrate_prep(page, vma, Faulting virtual address , page_nid, & flags)
3884  pte_unmap_unlock(Pointer to pte entry matching* the 'address'. NULL if the page* table hasn't been allocated., Page table lock.* Protects pte page table if 'pte'* is not NULL, otherwise pmd.)
3885  如果target_nid恒等于NUMA_NO_NODE
3886  put_page(page)
3887  转到:out
3891  migrated等于migrate_misplaced_page(page, vma, target_nid)
3892  如果migrated
3893  page_nid等于target_nid
3894  flags或等于TNF_MIGRATED
3895  否则flags或等于TNF_MIGRATE_FAIL
3898  out :
3899  如果page_nid不等于NUMA_NO_NODEtask_numa_fault(last_cpupid, page_nid, 1, flags)
3901  返回:0
调用者
名称描述
handle_pte_faultThese routines also need to handle stuff like marking pages dirty* and/or accessed for architectures that don't do it in hardware (most* RISC architectures)