Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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.

Proto:spinlock_t *__pmd_trans_huge_lock(pmd_t *pmd, struct vm_area_struct *vma)

Type:spinlock_t

Parameter:

TypeParameterName
pmd_t *pmd
struct vm_area_struct *vma
2016  ptl = pmd_lock(The address space we belong to. , pmd)
2017  If Value is more likely to compile time(is_swap_pmd( * pmd) || pmd_trans_huge( * pmd) || pmd_devmap( * pmd)) Then Return ptl
2020  spin_unlock(ptl)
2021  Return NULL
Caller
NameDescribe
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