函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:mem_cgroup_move_charge_pte_range

函数原型:static int mem_cgroup_move_charge_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end, struct mm_walk *walk)

返回类型:int

参数:

类型参数名称
pmd_t *pmd
unsigned longaddr
unsigned longend
struct mm_walk *walk
5682  ret等于0
5683  vma等于vma
5690  ptl等于mmap_sem must be held on entry
5691  如果ptl
5692  如果precharge小于HPAGE_PMD_NR
5694  返回:0
5696  target_type等于We don't consider PMD mapped swapping or file mapped pages because THP does* not support them for now.* Caller should make sure that pmd_trans_huge(pmd) is true.
5697  如果target_type恒等于MC_TARGET_PAGE
5698  page等于page
5708  否则如果target_type恒等于MC_TARGET_DEVICE
5709  page等于page
5712  precharge减等于HPAGE_PMD_NR
5713  moved_charge加等于HPAGE_PMD_NR
5717  自旋锁解锁
5718  返回:0
5721  如果This is a noop if Transparent Hugepage Support is not built into* the kernel则返回:0
5723  retry :
5724  pte等于pte_offset_map_lock(The address space we belong to. , pmd, addr, & ptl)
5725 addr不等于end循环
5726  ptent等于*pte自加
5727  bool device = false
5730  如果非precharge退出
5735  device = true
5738  page等于page
5751  precharge自减
5753  moved_charge自加
5757  put :
5759  退出
5761  ent等于ent
5763  precharge自减
5765  moved_swap自加
5767  退出
5768  默认
5769  退出
5772  pte_unmap_unlock(pte - 1, ptl)
5773  cond_resched()
5775  如果addr不等于end
5782  ret等于Handlers for move charge at task migration.
5783  如果非ret则转到:retry
5787  返回:ret