Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:mem_cgroup_out_of_memory

Proto:static bool mem_cgroup_out_of_memory(struct mem_cgroup *memcg, gfp_t gfp_mask, int order)

Type:bool

Parameter:

TypeParameterName
struct mem_cgroup *memcg
gfp_tgfp_mask
intorder
1562  struct oom_control oc = {Used to determine cpuset = NULL, Used to determine mempolicy = NULL, Memory cgroup in which oom is invoked, or NULL for global oom = memcg, Used to determine cpuset and node locality requirement = gfp_mask, rder == -1 means the oom kill is required by sysrq, otherwise only* for display purposes. = order, }
1571  If mutex_lock_killable( & Serializes oom killer invocations (out_of_memory()) from all contexts to* prevent from over eager oom killing (e) Then Return true
1577  ret = should_force_charge() || _of_memory - kill the "best" process when we run out of memory*@oc: pointer to struct oom_control* If we run out of memory, we have the choice between either* killing a random task (bad), letting the system crash (worse)
1578  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
1579  Return ret
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
memory_max_write