函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:oom_evaluate_task

函数原型:static int oom_evaluate_task(struct task_struct *task, void *arg)

返回类型:int

参数:

类型参数名称
struct task_struct *task
void *arg
311  oc等于arg
314  如果rn true if the task is not adequate as candidate victim task. 则转到:next
318  如果非is_memcg_oom(oc)且非m_cpuset_eligible() - check task eligiblity for kill*@start: task struct of which task to consider*@oc: pointer to struct oom_control* Task eligibility is determined by whether or not a candidate task, @tsk,* shares the same mempolicy nodes as current if 则转到:next
327  如果非rder == -1 means the oom kill is required by sysrq, otherwise only* for display purposes.tsk_is_oom_victim(task)则
328  如果st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from则转到:next
330  转到:abort
337  如果oom_task_origin(task)则
338  points等于ULONG_MAX
339  转到:select
342  points等于m_badness - heuristic function to determine which candidate task to kill*@p: task struct of which task we should calculate*@totalpages: total present RAM allowed for page allocation* The heuristic for determining which task to kill is made to be as simple
343  如果非pointspoints小于chosen_points则转到:next
346  select :
347  如果chosenput_task_struct(chosen)
349  get_task_struct(task)
350  chosen等于task
351  chosen_points等于points
352  :
353  返回:0
354  abort :
355  如果chosenput_task_struct(chosen)
357  chosen = (void * ) - 1UL
358  返回:1
调用者
名称描述
select_bad_processSimple selection loop. We choose the process with the highest number of* 'points'. In case scan was aborted, oc->chosen is set to -1.