Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\oom_kill.c Create Date:2022-07-28 14:06:40
Last Modify:2022-05-23 13:16:41 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

Proto:void pagefault_out_of_memory(void)

Type:void

Parameter:Nothing

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  If mem_cgroup_oom_synchronize(true) Then Return
1134  If Not mutex_trylock - try to acquire the mutex, without waiting*@lock: the mutex to be acquired* Try to acquire the mutex atomically Then Return
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.