From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail203.messagelabs.com (mail203.messagelabs.com [216.82.254.243]) by kanga.kvack.org (Postfix) with ESMTP id EB1496B01E0 for ; Tue, 8 Jun 2010 23:59:35 -0400 (EDT) Received: from kpbe14.cbf.corp.google.com (kpbe14.cbf.corp.google.com [172.25.105.78]) by smtp-out.google.com with ESMTP id o593xXVB004989 for ; Tue, 8 Jun 2010 20:59:33 -0700 Received: from pxi4 (pxi4.prod.google.com [10.243.27.4]) by kpbe14.cbf.corp.google.com with ESMTP id o593xW5h024065 for ; Tue, 8 Jun 2010 20:59:32 -0700 Received: by pxi4 with SMTP id 4so2898031pxi.26 for ; Tue, 08 Jun 2010 20:59:32 -0700 (PDT) Date: Tue, 8 Jun 2010 20:59:28 -0700 (PDT) From: David Rientjes Subject: [patch -mm 6/6] oom: improve commentary in dump_tasks() In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org To: Andrew Morton Cc: Oleg Nesterov , KOSAKI Motohiro , KAMEZAWA Hiroyuki , linux-mm@kvack.org List-ID: 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 Signed-off-by: David Rientjes --- 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: email@kvack.org