函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\oom_kill.c Create Date:2022-07-27 15:29:52
Last Modify:2022-05-23 13:16:41 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:The pagefault handler calls here because it is out of memory, so kill a* memory-hogging task. If oom_lock is held by somebody else, a parallel oom* killing is already in progress so do nothing.

函数原型:void pagefault_out_of_memory(void)

返回类型:void

参数:

1123  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 = NULL, Used to determine cpuset and node locality requirement = 0, rder == -1 means the oom kill is required by sysrq, otherwise only* for display purposes. = 0, }
1131  如果mem_cgroup_oom_synchronize(true)则返回
1134  如果非mutex_trylock - try to acquire the mutex, without waiting*@lock: the mutex to be acquired* Try to acquire the mutex atomically则返回
1136  _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)
1137  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.