From: Sha Zhengju <handai.szj@gmail.com>
To: linux-mm@kvack.org, cgroups@vger.kernel.org
Cc: Sha Zhengju <handai.szj@taobao.com>,
kamezawa.hiroyu@jp.fujitsu.com, akpm@linux-foundation.org,
mhocko@suse.cz, gthelen@google.com, hannes@cmpxchg.org,
rientjes@google.com
Subject: [PATCH 2/2] memcg, oom: Clarify some oom dump messages
Date: Wed, 25 Jul 2012 00:12:14 +0800 [thread overview]
Message-ID: <1343146334-15161-1-git-send-email-handai.szj@taobao.com> (raw)
In-Reply-To: <1343146160-15012-1-git-send-email-handai.szj@taobao.com>
From: Sha Zhengju <handai.szj@taobao.com>
Revise some oom dump messages to avoid misleading admin.
Signed-off-by: Sha Zhengju <handai.szj@taobao.com>
Cc: kamezawa.hiroyu@jp.fujitsu.com
Cc: akpm@linux-foundation.org
Cc: mhocko@suse.cz
Cc: gthelen@google.com
Cc: hannes@cmpxchg.org
Cc: rientjes@google.com
---
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@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2012-07-24 16:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-24 16:09 [PATCH 1/2] memcg, oom: Provide more info while memcg oom happening Sha Zhengju
2012-07-24 16:12 ` Sha Zhengju [this message]
2012-08-01 3:55 ` [PATCH 2/2] memcg, oom: Clarify some oom dump messages David Rientjes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1343146334-15161-1-git-send-email-handai.szj@taobao.com \
--to=handai.szj@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=gthelen@google.com \
--cc=handai.szj@taobao.com \
--cc=hannes@cmpxchg.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.cz \
--cc=rientjes@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox