Lines Matching refs:victim

161 /* return true if the task is not adequate as candidate victim task. */
440 static void dump_oom_summary(struct oom_control *oc, struct task_struct *victim)
447 mem_cgroup_print_oom_context(oc->memcg, victim);
448 pr_cont(",task=%s,pid=%d,uid=%d\n", victim->comm, victim->pid,
449 from_kuid(&init_user_ns, task_uid(victim)));
503 * victim (if that is possible) to help the OOM killer to move on.
667 /* The victim managed to terminate on its own - see exit_mmap */
682 * Give the OOM victim time to exit naturally before invoking the oom_reaping.
747 * mark_oom_victim - mark the given task as OOM victim
781 * exit_oom_victim - note the exit of an OOM victim
821 * current is not killed (possibly due to sharing the victim's memory).
914 static void __oom_kill_process(struct task_struct *victim, const char *message)
920 p = find_lock_task_mm(victim);
922 pr_info("%s: OOM victim %d (%s) is already exiting. Skip killing the task\n",
923 message, task_pid_nr(victim), victim->comm);
924 put_task_struct(victim);
926 } else if (victim != p) {
928 put_task_struct(victim);
929 victim = p;
932 /* Get a reference to safely compare mm after task_unlock(victim) */
933 mm = victim->mm;
942 * in order to prevent the OOM victim from depleting the memory
945 do_send_sig_info(SIGKILL, SEND_SIG_PRIV, victim, PIDTYPE_TGID);
946 mark_oom_victim(victim);
948 message, task_pid_nr(victim), victim->comm, K(mm->total_vm),
952 from_kuid(&init_user_ns, task_uid(victim)),
953 mm_pgtables_bytes(mm) >> 10, victim->signal->oom_score_adj);
954 task_unlock(victim);
957 * Kill all user processes sharing victim->mm in other thread groups, if
969 if (same_thread_group(p, victim))
975 task_pid_nr(victim), victim->comm,
990 queue_oom_reaper(victim);
993 put_task_struct(victim);
1012 struct task_struct *victim = oc->chosen;
1022 task_lock(victim);
1023 if (task_will_free_mem(victim)) {
1024 mark_oom_victim(victim);
1025 queue_oom_reaper(victim);
1026 task_unlock(victim);
1027 put_task_struct(victim);
1030 task_unlock(victim);
1033 dump_header(oc, victim);
1038 * Check this out before killing the victim task.
1040 oom_group = mem_cgroup_get_oom_group(victim, oc->memcg);
1042 __oom_kill_process(victim, message);