函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:mark_oom_victim - mark the given task as OOM victim*@tsk: task to mark* Has to be called with oom_lock held and never after* oom has been disabled already.* under task_lock or operate on the current).

函数原型:static void mark_oom_victim(struct task_struct *tsk)

返回类型:void

参数:

类型参数名称
struct task_struct *tsk>mm has to be non NULL and caller has to guarantee it is stable (either
698  mm等于mm
700  WARN_ON(oom_killer_disabled)
702  如果test_and_set_tsk_thread_flag(>mm has to be non NULL and caller has to guarantee it is stable (either, s terminating due to OOM killer )则返回
706  如果非cmpxchg( & oom_mm, NULL, mm)则
707  mmgrab() - Pin a &struct mm_struct
708  设置内存位
717  __thaw_task(>mm has to be non NULL and caller has to guarantee it is stable (either)
718  atomic_inc( & Number of OOM victims in flight)
719  trace_mark_victim(pid)
调用者
名称描述
__oom_kill_process
oom_kill_process
out_of_memory_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)