diff options
author | Tetsuo Handa <[email protected]> | 2015-11-05 18:47:54 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2015-11-05 19:34:48 -0800 |
commit | 840807a8f40bb25a8df5b6412bba6bc156643be5 (patch) | |
tree | 51410f5a9d55dd74f9c8c33bc2af9ab3010f6a8b | |
parent | 880b768937e90c433c0c8254a22b1eb63df005a4 (diff) |
mm/oom_kill.c: suppress unnecessary "sharing same memory" message
oom_kill_process() sends SIGKILL to other thread groups sharing victim's
mm. But printing
"Kill process %d (%s) sharing same memory\n"
lines makes no sense if they already have pending SIGKILL. This patch
reduces the "Kill process" lines by printing that line with info level
only if SIGKILL is not pending.
Signed-off-by: Tetsuo Handa <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Cc: David Rientjes <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | mm/oom_kill.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 5ba743aaba87..c170d9f0a158 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -583,9 +583,11 @@ void oom_kill_process(struct oom_control *oc, struct task_struct *p, !(p->flags & PF_KTHREAD)) { if (p->signal->oom_score_adj == OOM_SCORE_ADJ_MIN) continue; + if (fatal_signal_pending(p)) + continue; task_lock(p); /* Protect ->comm from prctl() */ - pr_err("Kill process %d (%s) sharing same memory\n", + pr_info("Kill process %d (%s) sharing same memory\n", task_pid_nr(p), p->comm); task_unlock(p); do_send_sig_info(SIGKILL, SEND_SIG_FORCED, p, true); |