Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:By the time we get here, we already hold the mm semaphore* The mmap_sem may have been released depending on flags and our* return value. See filemap_fault() and __lock_page_or_retry().

Proto:vm_fault_t handle_mm_fault(struct vm_area_struct *vma, unsigned long address, unsigned int flags)

Type:vm_fault_t

Parameter:

TypeParameterName
struct vm_area_struct *vma
unsigned longaddress
unsigned intflags
4160  set_current_state() includes a barrier so that the write of current->state* is correctly serialised wrt the caller's subsequent test of whether to* actually sleep:* for (;;) {* set_current_state(TASK_UNINTERRUPTIBLE);* if (!need_sleep)* break;* (Used in tsk->state: )
4162  Disable counters
4163  count_memcg_event_mm(The address space we belong to. , PGFAULT)
4166  check_sync_rss_stat(current process)
4168  If Not arch_vma_access_permitted(vma, flags & Fault was a write access , flags & The fault was during an instruction fetch , flags & aulting for non current tsk/mm ) Then Return VM_FAULT_SIGSEGV
4177  If flags & The fault originated in userspace Then mem_cgroup_enter_user_fault()
4180  If Value for the false possibility is greater at compile time(is_vm_hugetlb_page(vma)) Then ret = hugetlb_fault(The address space we belong to. , vma, address, flags)
4182  Else ret = By the time we get here, we already hold the mm semaphore* The mmap_sem may have been released depending on flags and our* return value. See filemap_fault() and __lock_page_or_retry().
4185  If flags & The fault originated in userspace Then
4186  mem_cgroup_exit_user_fault()
4193  If task_in_memcg_oom(current process) && Not (ret & VM_FAULT_OOM) Then mem_cgroup_oom_synchronize(false)
4197  Return ret
Caller
NameDescribe
fixup_user_faultxup_user_fault() - manually resolve a user page fault*@tsk: the task_struct to use for page fault accounting, or* NULL if faults are not to be recorded
break_ksmWe use break_ksm to break COW on a ksm page: it's a stripped down* if (get_user_pages(addr, 1, 1, 1, &page, NULL) == 1)* put_page(page);* but taking great care only to touch a ksm page, in a VM_MERGEABLE vma,
hmm_vma_do_fault