函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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

函数原型:unsigned long oom_badness(struct task_struct *p, unsigned long totalpages)

返回类型:unsigned long

参数:

类型参数名称
struct task_struct *p
unsigned longtotalpages
203  如果rn true if the task is not adequate as candidate victim task. 则返回:0
206  p等于The process p may have detached its own ->mm while exiting or through* use_mm(), but one or more of its subthreads may still have a valid* pointer. Return p, or any of its subthreads with a valid ->mm, with* task_lock() held.
207  如果非p则返回:0
215  adj等于oom_score_adj
216  如果adj恒等于/proc//oom_score_adj set to OOM_SCORE_ADJ_MIN disables oom killing for* pid.st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting fromin_vfork(p)则
219  task_unlock(p)
220  返回:0
227  points等于get_mm_rss(mm)加per-process(per-mm_struct) statistics.mm_pgtables_bytes(mm)除PAGE_SIZE
229  task_unlock(p)
232  adj乘等于totalpages除1000
233  points加等于adj
239  返回:如果points大于0则points否则1
调用者
名称描述
oom_evaluate_task