函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:mem_cgroup_scan_tasks - iterate over tasks of a memory cgroup hierarchy*@memcg: hierarchy root*@fn: function to call for each task*@arg: argument passed to @fn* This function iterates over tasks attached to @memcg or to any of its

函数原型:int mem_cgroup_scan_tasks(struct mem_cgroup *memcg, int (*fn)(struct task_struct *, void *), void *arg)

返回类型:int

参数:

类型参数名称
struct mem_cgroup *memcg
int (*fn
void *arg
1182  ret等于0
1184  BUG_ON(memcg == root_mem_cgroup)
1190  ss_task_iter_start - initiate task iteration*@css: the css to walk tasks of*@flags: CSS_TASK_ITER_* flags*@it: the task iterator to use* Initiate iteration through the tasks of @css
1191  当非rettask等于ss_task_iter_next - return the next task for the iterator*@it: the task iterator being iterated* The "next" function for task iteration. @it should have been* initialized via css_task_iter_start(). Returns NULL when the iteration* reaches the end.循环
1192  ret等于fn(task, arg)
1193  ss_task_iter_end - finish task iteration*@it: the task iterator to finish* Finish task iteration started by css_task_iter_start().
1194  如果ret
1195  mem_cgroup_iter_break - abort a hierarchy walk prematurely*@root: hierarchy root*@prev: last visited hierarchy member as returned by mem_cgroup_iter()
1196  退出
1199  返回:ret
调用者
名称描述
dump_tasksdump_tasks - dump current memory state of all system tasks*@oc: pointer to struct oom_control* Dumps the current memory state of all eligible tasks. Tasks not in the same* memcg, not in the same cpuset, or bound to a disjoint set of mempolicy nodes
oom_kill_process
select_bad_processSimple selection loop. We choose the process with the highest number of* 'points'. In case scan was aborted, oc->chosen is set to -1.