From: Sha Zhengju <handai.szj@xxxxxxxxxx> Revise some oom dump messages to avoid misleading admin. Signed-off-by: Sha Zhengju <handai.szj@xxxxxxxxxx> Cc: kamezawa.hiroyu@xxxxxxxxxxxxxx Cc: akpm@xxxxxxxxxxxxxxxxxxxx Cc: mhocko@xxxxxxx Cc: gthelen@xxxxxxxxxx Cc: hannes@xxxxxxxxxxx Cc: rientjes@xxxxxxxxxx --- mm/memcontrol.c | 2 +- mm/oom_kill.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index a3037af..7ce605c 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -1472,7 +1472,7 @@ void mem_cgroup_print_oom_info(struct mem_cgroup *memcg, struct task_struct *p) } rcu_read_unlock(); - printk(KERN_INFO "Task in %s killed", memcg_name); + printk(KERN_INFO "Task in %s will be killed", memcg_name); rcu_read_lock(); ret = cgroup_path(mem_cgrp, memcg_name, PATH_MAX); diff --git a/mm/oom_kill.c b/mm/oom_kill.c index b47ed97..3fc9f99 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -471,7 +471,7 @@ void oom_kill_process(struct task_struct *p, gfp_t gfp_mask, int order, dump_header(p, gfp_mask, order, memcg, nodemask); task_lock(p); - pr_err("%s: Kill process %d (%s) score %d or sacrifice child\n", + pr_err("%s: Will kill process %d (%s) score %d or sacrifice child\n", message, task_pid_nr(p), p->comm, points); task_unlock(p); @@ -508,6 +508,7 @@ void oom_kill_process(struct task_struct *p, gfp_t gfp_mask, int order, if (!p) { rcu_read_unlock(); put_task_struct(victim); + pr_err("No process has been killed!\n"); return; } else if (victim != p) { get_task_struct(p); @@ -539,7 +540,7 @@ void oom_kill_process(struct task_struct *p, gfp_t gfp_mask, int order, continue; task_lock(p); /* Protect ->comm from prctl() */ - pr_err("Kill process %d (%s) sharing same memory\n", + pr_err("Killed 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); -- 1.7.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>