函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Check OOM-Killer is already running under our hierarchy.* If someone is running, return false.

函数原型:static bool mem_cgroup_oom_trylock(struct mem_cgroup *memcg)

返回类型:bool

参数:

类型参数名称
struct mem_cgroup *memcg
1646  struct mem_cgroup * iter, * failed = NULL
1648  加自旋锁
1651  如果 protected by memcg_oom_lock
1656  failed等于iter
1657  mem_cgroup_iter_break - abort a hierarchy walk prematurely*@root: hierarchy root*@prev: last visited hierarchy member as returned by mem_cgroup_iter()
1658  退出
1659  否则 protected by memcg_oom_lock = true
1663  如果failed
1669  如果iter恒等于failed
1671  退出
1673  protected by memcg_oom_lock = false
1675  否则mutex_acquire( & memcg_oom_lock_dep_map, 0, 1, _RET_IP_)
1678  自旋锁解锁
1680  返回:非failed
调用者
名称描述
mem_cgroup_oom
mem_cgroup_oom_synchronizemem_cgroup_oom_synchronize - complete memcg OOM handling*@handle: actually kill/wait or just clean up the OOM state* This has to be called at the end of a page fault if the memcg OOM* handler was enabled