From: David Rientjes <rientjes@google.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
linux-mm@kvack.org
Subject: [patch -mm 6/6] oom: improve commentary in dump_tasks()
Date: Tue, 8 Jun 2010 20:59:28 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.00.1006082058400.6219@chino.kir.corp.google.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1006082053130.6219@chino.kir.corp.google.com>
The comments in dump_tasks() should be updated to be more clear about why
tasks are filtered and how they are filtered by its argument.
An unnecessary comment concerning a check for is_global_init() is removed
since it isn't of importance.
Suggested-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Rientjes <rientjes@google.com>
---
mm/oom_kill.c | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -351,7 +351,7 @@ static struct task_struct *select_bad_process(unsigned long *ppoints,
/**
* dump_tasks - dump current memory state of all system tasks
- * @mem: target memory controller
+ * @mem: current's memory controller, if constrained
*
* Dumps the current memory state of all system tasks, excluding kernel threads.
* State information includes task's pid, uid, tgid, vm size, rss, cpu, oom_adj
@@ -370,11 +370,6 @@ static void dump_tasks(const struct mem_cgroup *mem)
printk(KERN_INFO "[ pid ] uid tgid total_vm rss cpu oom_adj "
"name\n");
for_each_process(p) {
- /*
- * We don't have is_global_init() check here, because the old
- * code do that. printing init process is not big matter. But
- * we don't hope to make unnecessary compatibility breaking.
- */
if (p->flags & PF_KTHREAD)
continue;
if (mem && !task_in_mem_cgroup(p, mem))
@@ -383,8 +378,8 @@ static void dump_tasks(const struct mem_cgroup *mem)
task = find_lock_task_mm(p);
if (!task) {
/*
- * Probably oom vs task-exiting race was happen and ->mm
- * have been detached. thus there's no need to report
+ * This is a kthread or all of p's threads have already
+ * detached their mm's. There's no need to report
* them; they can't be oom killed anyway.
*/
continue;
--
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>
prev parent reply other threads:[~2010-06-09 3:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-09 3:59 [patch -mm 0/6] oom: various tiny cleanups and fixes David Rientjes
2010-06-09 3:59 ` [patch -mm 1/6] oom: dump_tasks use find_lock_task_mm too fix David Rientjes
2010-06-09 3:59 ` [patch -mm 2/6] oom: protect dereferencing of task's comm David Rientjes
2010-06-09 3:59 ` [patch -mm 3/6] oom: add has_intersects_mems_allowed UMA variant David Rientjes
2010-06-09 3:59 ` [patch -mm 4/6] oom: introduce find_lock_task_mm to fix mm false positives fix David Rientjes
2010-06-09 3:59 ` [patch -mm 5/6] oom: sacrifice child with highest badness score for parent fix David Rientjes
2010-06-09 3:59 ` David Rientjes [this message]
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=alpine.DEB.2.00.1006082058400.6219@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=akpm@linux-foundation.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=oleg@redhat.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