Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

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

Type:enum mc_target_type

Parameter:

TypeParameterName
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  If pte_present(ptent) Then page = mc_handle_present_pte(vma, addr, ptent)
5405  Else if heck whether a pte points to a swap entry Then page = mc_handle_swap_pte(vma, ptent, & ent)
5407  Else if pte_none(ptent) Then page = mc_handle_file_pte(vma, addr, ptent, & ent)
5410  If Not page && Not val Then Return ret
5412  If page Then
5418  If mem_cgroup == from Then
5419  ret = MC_TARGET_PAGE
5422  If target Then page = page
5425  If Not ret || Not target Then Perform a free_page(), also freeing any swap cache associated with* this page if it is the last user of the page.
5432  If val && Not ret && ( Not page || Not 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) Then
5434  ret = MC_TARGET_SWAP
5435  If target Then ent = ent
5438  Return ret
Caller
NameDescribe
mem_cgroup_count_precharge_pte_range
mem_cgroup_move_charge_pte_range