函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:move_huge_pmd

函数原型:bool move_huge_pmd(struct vm_area_struct *vma, unsigned long old_addr, unsigned long new_addr, unsigned long old_end, pmd_t *old_pmd, pmd_t *new_pmd)

返回类型:bool

参数:

类型参数名称
struct vm_area_struct *vma
unsigned longold_addr
unsigned longnew_addr
unsigned longold_end
pmd_t *old_pmd
pmd_t *new_pmd
1871  mm等于The address space we belong to.
1872  bool force_flush = false
1874  如果old_addr按位与HPAGE_PMD_MASK的反或new_addr按位与HPAGE_PMD_MASK的反或old_endold_addr小于HPAGE_PMD_SIZE则返回:false
1883  如果WARN_ON(!pmd_none( * new_pmd))则
1884  VM_BUG_ON(pmd_trans_huge( * new_pmd))
1885  返回:false
1892  old_ptl等于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.
1893  如果old_ptl
1894  new_ptl等于pmd_lockptr(mm, new_pmd)
1895  如果new_ptl不等于old_ptlspin_lock_nested(new_ptl, For trivial one-depth nesting of a lock-class, the following* global define can be used. (Subsystems with multiple levels* of nesting should define their own lock-nesting subclasses.))
1897  pmd等于pmdp_huge_get_and_clear(mm, old_addr, old_pmd)
1898  如果pmd_present(pmd)则force_flush = true
1900  VM_BUG_ON(!pmd_none( * new_pmd))
1907  pmd等于move_soft_dirty_pmd(pmd)
1908  set_pmd_at(mm, new_addr, new_pmd, pmd)
1909  如果force_flushflush_tlb_range(vma, old_addr, old_addr + PMD_SIZE)
1911  如果new_ptl不等于old_ptl自旋锁解锁
1913  自旋锁解锁
1914  返回:true
1916  返回:false
调用者
名称描述
move_page_tables