函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:mem_cgroup_soft_reclaim

函数原型:static int mem_cgroup_soft_reclaim(struct mem_cgroup *root_memcg, pg_data_t *pgdat, gfp_t gfp_mask, unsigned long *total_scanned)

返回类型:int

参数:

类型参数名称
struct mem_cgroup *root_memcg
pg_data_t *pgdat
gfp_tgfp_mask
unsigned long *total_scanned
1587  struct mem_cgroup * victim = NULL
1588  total等于0
1589  loop等于0
1592  struct mem_cgroup_reclaim_cookie reclaim = {pgdat = pgdat, }
1596  excess等于soft_limit_excess(root_memcg)
1598  当1循环
1599  victim等于mem_cgroup_iter - iterate over memory cgroup hierarchy*@root: hierarchy root*@prev: previously returned memcg, NULL on first invocation*@reclaim: cookie for shared reclaim walks, NULL for full walks* Returns references to children of the hierarchy below
1600  如果非victim
1601  loop自加
1602  如果loop大于等于2则
1620  继续下一循环
1622  total加等于Only used by soft limit reclaim. Do not reuse for anything else.
1624  total_scanned加等于nr_scanned
1625  如果非soft_limit_excess(root_memcg)则退出
1628  mem_cgroup_iter_break - abort a hierarchy walk prematurely*@root: hierarchy root*@prev: last visited hierarchy member as returned by mem_cgroup_iter()
1629  返回:total
调用者
名称描述
mem_cgroup_soft_limit_reclaim