函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:get_mctgt_type - get target type of moving charge*@vma: the vma the pte to be checked belongs*@addr: the address corresponding to the pte to be checked*@ptent: the pte to be checked*@target: the pointer the target page or swap ent will be stored(can be

函数原型:static enum mc_target_type get_mctgt_type(struct vm_area_struct *vma, unsigned long addr, pte_t ptent, union mc_target *target)

返回类型:enum mc_target_type

参数:

类型参数名称
struct vm_area_struct *vma
unsigned longaddr
pte_tptent
union mc_target *target
5399  struct page * page = NULL
5400  ret等于MC_TARGET_NONE
5401  swp_entry_t ent = {val = 0}
5403  如果pte_present(ptent)则page等于mc_handle_present_pte(vma, addr, ptent)
5405  否则如果heck whether a pte points to a swap entry page等于mc_handle_swap_pte(vma, ptent, & ent)
5407  否则如果pte_none(ptent)则page等于mc_handle_file_pte(vma, addr, ptent, & ent)
5410  如果非page且非val则返回:ret
5412  如果page
5418  如果mem_cgroup恒等于from
5419  ret等于MC_TARGET_PAGE
5422  如果targetpage等于page
5425  如果非ret或非targetPerform a free_page(), also freeing any swap cache associated with* this page if it is the last user of the page.
5432  如果val且非ret且非page或非PageTransCompound returns true for both transparent huge pages* and hugetlbfs pages, so it should only be called when it's known* that hugetlbfs pages aren't involved.的值且mem_cgroup_id(from)恒等于lookup_swap_cgroup_id(ent)则
5434  ret等于MC_TARGET_SWAP
5435  如果targetent等于ent
5438  返回:ret
调用者
名称描述
mem_cgroup_count_precharge_pte_range
mem_cgroup_move_charge_pte_range