函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:This is called when the original mapper is failing to COW a MAP_PRIVATE* mappping it owns the reserve page for. The intention is to unmap the page* from other VMAs and let the children be SIGKILLed if they are faulting the* same region.

函数原型:static void unmap_ref_private(struct mm_struct *mm, struct vm_area_struct *vma, struct page *page, unsigned long address)

返回类型:void

参数:

类型参数名称
struct mm_struct *mm
struct vm_area_struct *vma
struct page *page
unsigned longaddress
3555  h等于hstate_vma(vma)
3564  address等于address按位与huge_page_mask(h)
3565  pgoff等于addressOur start address within vm_mm. 右移PAGE_SHIFT determines the page size 位的值加Offset (within vm_file) in PAGE_SIZEunits
3567  mapping等于f_mapping
3574  i_mmap_lock_write(mapping)
3577  如果iter_vma恒等于vma则继续下一循环
3585  如果Flags, see mm.h. 按位与VM_MAYSHARE则继续下一循环
3595  如果非is_vma_resv_set(iter_vma, Flags for MAP_PRIVATE reservations. These are stored in the bottom* bits of the reservation map pointer, which are always clear due to* alignment.)则unmap_hugepage_range(iter_vma, address, address + huge_page_size(h), page)
3599  i_mmap_unlock_write(mapping)
调用者
名称描述
hugetlb_cowHugetlb_cow() should be called with page lock of the original hugepage held.* Called with hugetlb_instantiation_mutex held and pte_page locked so we* cannot race with other handlers or page migration.