Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:do_read_fault

Proto:static vm_fault_t do_read_fault(struct vm_fault *vmf)

Type:vm_fault_t

Parameter:

TypeParameterName
struct vm_fault *vmf
3642  vma = Target VMA
3643  ret = 0
3650  If map_pages && fault_around_bytes >> PAGE_SHIFT determines the page size > 1 Then
3651  ret = do_fault_around() tries to map few pages around the fault address. The hope* is that the pages will be needed soon and this will lower the number of* faults to handle.* It uses vm_ops->map_pages() to map the pages, which skips the page if it's
3652  If ret Then Return ret
3656  ret = The mmap_sem must have been held on entry, and may have been* released depending on flags and vma->vm_ops->fault() return value.* See filemap_fault() and __lock_page_retry().
3657  If Value for the false possibility is greater at compile time(ret & (VM_FAULT_ERROR | VM_FAULT_NOPAGE | VM_FAULT_RETRY)) Then Return ret
3660  ret |= sh_fault - finish page fault once we have prepared the page to fault*@vmf: structure describing the fault* This function handles all that is needed to finish a page fault once the* page to fault in is prepared
3661  lock_page - unlock a locked page*@page: the page* Unlocks the page and wakes up sleepers in ___wait_on_page_locked().* Also wakes sleepers in wait_on_page_writeback() because the wakeup* mechanism between PageLocked pages and PageWriteback pages is shared.
3662  If Value for the false possibility is greater at compile time(ret & (VM_FAULT_ERROR | VM_FAULT_NOPAGE | VM_FAULT_RETRY)) Then put_page(->fault handlers should return a* page here, unless VM_FAULT_NOPAGE* is set (which is also implied by* VM_FAULT_ERROR).)
3664  Return ret
Caller
NameDescribe
do_faultWe enter with non-exclusive mmap_sem (to exclude vma changes,* but allow concurrent faults)