函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:mem_cgroup_get_oom_group - get a memory cgroup to clean up after OOM*@victim: task to be killed by the OOM killer*@oom_domain: memcg in case of memcg OOM, NULL in case of system-wide OOM* Returns a pointer to a memory cgroup, which has to be cleaned up

函数原型:struct mem_cgroup *mem_cgroup_get_oom_group(struct task_struct *victim, struct mem_cgroup *oom_domain)

返回类型:struct mem_cgroup

参数:

类型参数名称
struct task_struct *victim
struct mem_cgroup *oom_domain
1904  struct mem_cgroup * oom_group = NULL
1907  如果非cgroup_subsys_on_dfl - fast test on whether a subsys is on default hierarchy*@ss: subsystem in question(memory_cgrp_subsys)则返回:NULL
1910  如果非oom_domainoom_domain等于root_mem_cgroup
1913  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
1915  memcg等于mem_cgroup_from_task(victim)
1916  如果memcg恒等于root_mem_cgroup则转到:out
1924 memcg循环
1925  如果* Should the OOM killer kill all belonging tasks, had it kill one?oom_group等于memcg
1928  如果memcg恒等于oom_domain退出
1932  如果oom_group获取指定CSS参考
1934  out :
1935  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
1937  返回:oom_group
调用者
名称描述
oom_kill_process