Lines Matching refs:victim

163 /* return true if the task is not adequate as candidate victim task. */
441 static void dump_oom_summary(struct oom_control *oc, struct task_struct *victim)
448 mem_cgroup_print_oom_context(oc->memcg, victim);
449 pr_cont(",task=%s,pid=%d,uid=%d\n", victim->comm, victim->pid,
450 from_kuid(&init_user_ns, task_uid(victim)));
506 * 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.
715 * mark_oom_victim - mark the given task as OOM victim
751 * exit_oom_victim - note the exit of an OOM victim
791 * current is not killed (possibly due to sharing the victim's memory).
884 static void __oom_kill_process(struct task_struct *victim, const char *message)
890 p = find_lock_task_mm(victim);
892 pr_info("%s: OOM victim %d (%s) is already exiting. Skip killing the task\n",
893 message, task_pid_nr(victim), victim->comm);
894 put_task_struct(victim);
896 } else if (victim != p) {
898 put_task_struct(victim);
899 victim = p;
902 /* Get a reference to safely compare mm after task_unlock(victim) */
903 mm = victim->mm;
912 * in order to prevent the OOM victim from depleting the memory
915 do_send_sig_info(SIGKILL, SEND_SIG_PRIV, victim, PIDTYPE_TGID);
916 mark_oom_victim(victim);
918 message, task_pid_nr(victim), victim->comm, K(mm->total_vm),
922 from_kuid(&init_user_ns, task_uid(victim)),
923 mm_pgtables_bytes(mm) >> 10, victim->signal->oom_score_adj);
924 task_unlock(victim);
927 * Kill all user processes sharing victim->mm in other thread groups, if
939 if (same_thread_group(p, victim))
945 task_pid_nr(victim), victim->comm,
960 queue_oom_reaper(victim);
963 put_task_struct(victim);
983 struct task_struct *victim = oc->chosen;
993 task_lock(victim);
994 if (task_will_free_mem(victim)) {
995 mark_oom_victim(victim);
996 queue_oom_reaper(victim);
997 task_unlock(victim);
998 put_task_struct(victim);
1001 task_unlock(victim);
1004 dump_header(oc, victim);
1009 * Check this out before killing the victim task.
1011 oom_group = mem_cgroup_get_oom_group(victim, oc->memcg);
1013 __oom_kill_process(victim, message);