函数逻辑报告 |
Source Code:mm\oom_kill.c |
Create Date:2022-07-27 15:29:40 |
Last Modify:2022-05-23 13:16:41 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:__oom_kill_process
函数原型:static void __oom_kill_process(struct task_struct *victim, const char *message)
返回类型:void
参数:
类型 | 参数 | 名称 |
---|---|---|
struct task_struct * | victim | |
const char * | message |
860 | bool can_oom_reap = true |
863 | 如果非p则 |
864 | put_task_struct(victim) |
865 | 返回 |
877 | Disable counters |
887 | 打印错误信息("%s: Killed process %d (%s) total-vm:%lukB, anon-rss:%lukB, file-rss:%lukB, shmem-rss:%lukB, UID:%u pgtables:%lukB oom_score_adj:%hd\n", message, task_pid_nr(victim), comm, K( Total pages mapped ), K(per-process(per-mm_struct) statistics.), K(per-process(per-mm_struct) statistics.), K(per-process(per-mm_struct) statistics.), m_kuid - Create a uid from a kuid user-namespace pair.*@targ: The user namespace we want a uid in.*@kuid: The kernel internal uid to start with.* Map @kuid into the user-namespace specified by @targ and* return the resulting uid., mm_pgtables_bytes(mm) >> 10, oom_score_adj) |
894 | task_unlock(victim) |
909 | 如果same_thread_group(p, victim)则继续下一循环 |
911 | 如果检查进程已初始化则 |
912 | can_oom_reap = false |
913 | 设置内存位 |
914 | 打印信息("oom killer %d (%s) has mm pinned by %d (%s)\n", task_pid_nr(victim), comm, task_pid_nr(p), comm) |
917 | 继续下一循环 |
923 | 如果此条件成立可能性小(为编译器优化)(flags & I am a kernel thread )则继续下一循环 |
929 | 如果can_oom_reap则wake_oom_reaper(victim) |
933 | put_task_struct(victim) |
名称 | 描述 |
---|---|
oom_kill_memcg_member | Kill provided task unless it's secured by setting* oom_score_adj to OOM_SCORE_ADJ_MIN. |
oom_kill_process |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |