Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

Proto:static void mark_oom_victim(struct task_struct *tsk)

Type:void

Parameter:

TypeParameterName
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  If 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 ) Then Return
706  If Not cmpxchg( & oom_mm, NULL, mm) Then
707  mmgrab() - Pin a &struct mm_struct
708  Atomically set a bit in memory
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)
Caller
NameDescribe
__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)