函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:mem_cgroup_out_of_memory

函数原型:static bool mem_cgroup_out_of_memory(struct mem_cgroup *memcg, gfp_t gfp_mask, int order)

返回类型:bool

参数:

类型参数名称
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  如果mutex_lock_killable( & Serializes oom killer invocations (out_of_memory()) from all contexts to* prevent from over eager oom killing (e)则返回: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  返回:ret
调用者
名称描述
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