函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:do_huge_pmd_anonymous_page

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

返回类型:vm_fault_t

参数:

类型参数名称
struct vm_fault *vmf
709  vma等于Target VMA
712  haddr等于Faulting virtual address 按位与HPAGE_PMD_MASK
714  如果非transhuge_vma_suitable(vma, haddr)则返回:VM_FAULT_FALLBACK
716  如果此条件成立可能性小(为编译器优化)(anon_vma_prepare(vma))则返回:VM_FAULT_OOM
718  如果此条件成立可能性小(为编译器优化)(khugepaged_enter(vma, Flags, see mm.h. ))则返回:VM_FAULT_OOM
720  如果非FAULT_FLAG_xxx flags 按位与Fault was a write access 的值且非To prevent common memory management code establishing* a zero page mapping on a read fault.* This macro should be defined within .* s390 does this to prevent multiplexing of hardware bits(The address space we belong to. )且transparent_hugepage_use_zero_page()则
727  pgtable等于pte_alloc_one(The address space we belong to. )
728  如果此条件成立可能性小(为编译器优化)(!pgtable)则返回:VM_FAULT_OOM
730  zero_page等于mm_get_huge_zero_page(The address space we belong to. )
734  返回:VM_FAULT_FALLBACK
736  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' )
737  ret等于0
738  set = false
741  如果ret
743  否则如果userfaultfd_missing(vma)则
747  否则
753  否则自旋锁解锁
755  如果非setpte_free - free PTE-level user page table page*@mm: the mm_struct of the current context*@pte_page: the `struct page` representing the page table
757  返回:ret
759  gfp等于always: directly stall for all thp allocations* defer: wake kswapd and fail if not immediately available* defer+madvise: wake kswapd and directly stall for MADV_HUGEPAGE, otherwise* fail if not immediately available* madvise: directly stall for
760  page等于alloc_hugepage_vma(gfp, vma, haddr, HPAGE_PMD_ORDER)
761  如果此条件成立可能性小(为编译器优化)(!page)则
762  Disable counters
763  返回:VM_FAULT_FALLBACK
765  prep_transhuge_page(page)
766  返回:__do_huge_pmd_anonymous_page(vmf, page, gfp)
调用者
名称描述
create_huge_pmd