函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Returns page table lock pointer if a given pmd maps a thp, NULL otherwise.* Note that if it returns page table lock pointer, this routine returns without* unlocking page table lock. So callers must unlock it.

函数原型:spinlock_t *__pmd_trans_huge_lock(pmd_t *pmd, struct vm_area_struct *vma)

返回类型:spinlock_t

参数:

类型参数名称
pmd_t *pmd
struct vm_area_struct *vma
2016  ptl等于pmd_lock(The address space we belong to. , pmd)
2017  如果此条件成立可能性大(为编译器优化)(is_swap_pmd( * pmd) || pmd_trans_huge( * pmd) || pmd_devmap( * pmd))则返回:ptl
2020  自旋锁解锁
2021  返回:NULL
调用者
名称描述
zap_huge_pmd
move_huge_pmd
change_huge_pmdReturns* - 0 if PMD could not be locked* - 1 if PMD was locked but protections unchange and TLB flush unnecessary* - HPAGE_PMD_NR is protections changed and TLB flush necessary
pmd_trans_huge_lockmmap_sem must be held on entry