Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\memcontrol.c Create Date:2022-07-28 16:10:01
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Check OOM-Killer is already running under our hierarchy.* If someone is running, return false.

Proto:static bool mem_cgroup_oom_trylock(struct mem_cgroup *memcg)

Type:bool

Parameter:

TypeParameterName
struct mem_cgroup *memcg
1646  struct mem_cgroup * iter, * failed = NULL
1648  spin_lock( & memcg_oom_lock)
1651  If protected by memcg_oom_lock Then
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  Break
1659  Else protected by memcg_oom_lock = true
1663  If failed Then
1669  If iter == failed Then
1671  Break
1673  protected by memcg_oom_lock = false
1675  Else mutex_acquire( & memcg_oom_lock_dep_map, 0, 1, _RET_IP_)
1678  spin_unlock( & memcg_oom_lock)
1680  Return Not failed
Caller
NameDescribe
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