函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Return true if we do MADV_FREE successfully on entire pmd page.* Otherwise, return false.

函数原型:bool madvise_free_huge_pmd(struct mmu_gather *tlb, struct vm_area_struct *vma, pmd_t *pmd, unsigned long addr, unsigned long next)

返回类型:bool

参数:

类型参数名称
struct mmu_gather *tlb
struct vm_area_struct *vma
pmd_t *pmd
unsigned longaddr
unsigned longnext
1701  mm等于mm
1702  bool ret = false
1704  tlb_change_page_size(tlb, HPAGE_PMD_SIZE)
1706  ptl等于mmap_sem must be held on entry
1707  如果非ptl则转到:out_unlocked
1710  orig_pmd等于pmd
1711  如果is_huge_zero_pmd(orig_pmd)则转到:out
1714  如果此条件成立可能性小(为编译器优化)(!pmd_present(orig_pmd))则
1715  VM_BUG_ON(thp_migration_supported() && !is_pmd_migration_entry(orig_pmd))
1717  转到:out
1720  page等于Currently stuck as a macro due to indirect forward reference to* linux/mmzone.h's __section_mem_map_addr() definition:(orig_pmd)
1725  如果page_mapcount(page)不等于1则转到:out
1728  如果非Return true if the page was successfully locked则转到:out
1735  如果nextaddr不等于HPAGE_PMD_SIZE
1736  get_page(page)
1737  自旋锁解锁
1738  split_huge_page(page)
1739  lock_page - unlock a locked page*@page: the page* Unlocks the page and wakes up sleepers in ___wait_on_page_locked().* Also wakes sleepers in wait_on_page_writeback() because the wakeup* mechanism between PageLocked pages and PageWriteback pages is shared.
1740  Perform a free_page(), also freeing any swap cache associated with* this page if it is the last user of the page.
1741  转到:out_unlocked
1744  如果PageDirty(page)则ClearPageDirty(page)
1746  lock_page - unlock a locked page*@page: the page* Unlocks the page and wakes up sleepers in ___wait_on_page_locked().* Also wakes sleepers in wait_on_page_writeback() because the wakeup* mechanism between PageLocked pages and PageWriteback pages is shared.
1748  如果pmd_young(orig_pmd)或pmd_dirty(orig_pmd)则
1749  pmdp_invalidate(vma, addr, pmd)
1750  orig_pmd等于pmd_mkold(orig_pmd)
1751  orig_pmd等于pmd_mkclean(orig_pmd)
1753  set_pmd_at(mm, addr, pmd, orig_pmd)
1754  tlb_remove_pmd_tlb_entry(tlb, pmd, addr)
1757  mark_page_lazyfree - make an anon page lazyfree*@page: page to deactivate* mark_page_lazyfree() moves @page to the inactive file list.* This is done to accelerate the reclaim of @page.
1758  ret = true
1759  out :
1760  自旋锁解锁
1761  out_unlocked :
1762  返回:ret
调用者
名称描述
madvise_free_pte_range