函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:oom_kill_process

函数原型:static void oom_kill_process(struct oom_control *oc, const char *message)

返回类型:void

参数:

类型参数名称
struct oom_control *oc
const char *message
953  victim等于chosen
955  DEFINE_RATELIMIT_STATE(oom_rs, DEFAULT_RATELIMIT_INTERVAL, DEFAULT_RATELIMIT_BURST)
963  Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring* subscriptions and synchronises with wait4(). Also used in procfs. Also* pins the final release of task.io_context. Also protects ->cpuset and* ->cgroup.subsys[]. And ->vfork_done.
964  如果Checks whether the given task is dying or exiting and likely to* release its address space. This means that all threads and processes* sharing the same mm have to be killed or exiting.* Caller has to make sure that task->mm is stable (hold task_lock or
965  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).
966  wake_oom_reaper(victim)
967  task_unlock(victim)
968  put_task_struct(victim)
969  返回
971  task_unlock(victim)
973  如果__ratelimit( & oom_rs)则dump_header(oc, victim)
981  oom_group等于mem_cgroup_get_oom_group(victim, Memory cgroup in which oom is invoked, or NULL for global oom )
983  __oom_kill_process(victim, message)
988  如果oom_group
989  mem_cgroup_print_oom_group(oom_group)
990  mem_cgroup_scan_tasks(oom_group, Kill provided task unless it's secured by setting* oom_score_adj to OOM_SCORE_ADJ_MIN., (void * )message)
992  mem_cgroup_put(oom_group)
调用者
名称描述
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)